diff --git a/graphic/graphic_2d/native_drawing/drawing_bitmap.h b/graphic/graphic_2d/native_drawing/drawing_bitmap.h index 95dd825f93f298b52e560a7a645346104da734e2..83e1a4aaa355428fa31d9c4b1a9b73fd75f88396 100644 --- a/graphic/graphic_2d/native_drawing/drawing_bitmap.h +++ b/graphic/graphic_2d/native_drawing/drawing_bitmap.h @@ -52,7 +52,7 @@ extern "C" { * @since 8 * @version 1.0 */ -typedef struct { +typedef struct OH_Drawing_BitmapFormat { /** Storage format of bitmap pixels */ OH_Drawing_ColorFormat colorFormat; /** Alpha format of bitmap pixels */ diff --git a/graphic/graphic_2d/native_drawing/drawing_canvas.h b/graphic/graphic_2d/native_drawing/drawing_canvas.h index 2581f31ab87dfc947b1b3a3e25e35b3f8d6265d9..8652fb460f9d011c180b146c28efd80cf7f7c87b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_canvas.h +++ b/graphic/graphic_2d/native_drawing/drawing_canvas.h @@ -54,7 +54,7 @@ extern "C" { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_SrcRectConstraint { /** * Using sampling only inside bounds in a slower manner. */ @@ -286,7 +286,7 @@ void OH_Drawing_CanvasDrawRegion(OH_Drawing_Canvas* canvas, const OH_Drawing_Reg * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PointMode { /** * Draw each point separately. */ @@ -506,7 +506,7 @@ void OH_Drawing_CanvasDrawTextBlob(OH_Drawing_Canvas* canvas, const OH_Drawing_T * @since 11 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_CanvasClipOp { /** * Clip with difference. */ @@ -684,7 +684,7 @@ void OH_Drawing_CanvasConcatMatrix(OH_Drawing_Canvas* canvas, OH_Drawing_Matrix* * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_CanvasShadowFlags { /** * Use no shadow flags. */ @@ -794,7 +794,7 @@ void OH_Drawing_CanvasDrawImageRect(OH_Drawing_Canvas* canvas, OH_Drawing_Image* * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_VertexMode { /** * The vertices are a triangle list. */ diff --git a/graphic/graphic_2d/native_drawing/drawing_error_code.h b/graphic/graphic_2d/native_drawing/drawing_error_code.h index 5bdc19682c4052b80b3c52d070ef15f78c099ae1..726e3c5543d2758ddf4cd986b4231fa2ee7e0da1 100644 --- a/graphic/graphic_2d/native_drawing/drawing_error_code.h +++ b/graphic/graphic_2d/native_drawing/drawing_error_code.h @@ -48,7 +48,7 @@ extern "C" { * @brief Enumerates error codes of drawing. * @since 12 */ -typedef enum { +typedef enum OH_Drawing_ErrorCode { /** * @error Operation completed successfully. */ @@ -89,7 +89,7 @@ OH_Drawing_ErrorCode OH_Drawing_ErrorCodeGet(); * @since 18 * @version 1.0 */ -void OH_Drawing_ErrorCodeReset(); +void OH_Drawing_ErrorCodeReset(void); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index e8582939c07e7975b18b1b9d6b3b1a490574a927..e58a97d796db269c1cd12997397360a38c377fc6 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -63,7 +63,7 @@ OH_Drawing_Font* OH_Drawing_FontCreate(void); * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_FontHinting { /** glyph outlines unchanged */ FONT_HINTING_NONE, /** minimal modification to improve contrast */ @@ -80,7 +80,7 @@ typedef enum { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_FontEdging { /** no transparent pixels on glyph edges */ FONT_EDGING_ALIAS, /** may have transparent pixels on glyph edges */ diff --git a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h index 1949a5e725f78c553096ebece81194d738b81f27..8687895079df6743840909bbbabdf8effd407a5f 100644 --- a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h +++ b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h @@ -52,7 +52,7 @@ extern "C" { * @since 12 * @version 1.0 */ -typedef struct { +typedef struct OH_Drawing_GpuContextOptions { /** If true this allows path mask textures to be cached */ bool allowPathMaskCaching; } OH_Drawing_GpuContextOptions; diff --git a/graphic/graphic_2d/native_drawing/drawing_mask_filter.h b/graphic/graphic_2d/native_drawing/drawing_mask_filter.h index c265e1c9098f053442ad8c364be8eaa642c58b59..ac54271622d11d2cd10fe45ca734a2ee728fc2c9 100644 --- a/graphic/graphic_2d/native_drawing/drawing_mask_filter.h +++ b/graphic/graphic_2d/native_drawing/drawing_mask_filter.h @@ -52,7 +52,7 @@ extern "C" { * @since 11 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_BlurType { /** * Fuzzy inside and outside. */ diff --git a/graphic/graphic_2d/native_drawing/drawing_matrix.h b/graphic/graphic_2d/native_drawing/drawing_matrix.h index bbf6645dfaf5910f121f92fbe67eac5150aa0eb0..890a11286c2487ac20edf3e2c834f4c6cab03f8c 100644 --- a/graphic/graphic_2d/native_drawing/drawing_matrix.h +++ b/graphic/graphic_2d/native_drawing/drawing_matrix.h @@ -123,7 +123,7 @@ void OH_Drawing_MatrixSetMatrix(OH_Drawing_Matrix* matrix, float scaleX, float s * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_ScaleToFit { /** * Scales in x and y to fill destination rect. */ diff --git a/graphic/graphic_2d/native_drawing/drawing_path.h b/graphic/graphic_2d/native_drawing/drawing_path.h index a198ec8551f97e32d57896bbe297bccc946e894c..4a08a3e359cec76cd35287363be7a1409a7c899f 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path.h +++ b/graphic/graphic_2d/native_drawing/drawing_path.h @@ -53,7 +53,7 @@ extern "C" { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PathDirection { /** clockwise direction for adding closed contours */ PATH_DIRECTION_CW, /** counter-clockwise direction for adding closed contours */ @@ -66,7 +66,7 @@ typedef enum { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PathFillType { /** Specifies that "inside" is computed by a non-zero sum of signed edge crossings */ PATH_FILL_TYPE_WINDING, /** Specifies that "inside" is computed by an odd number of edge crossings */ @@ -83,7 +83,7 @@ typedef enum { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PathAddMode { /** Appended to destination unaltered */ PATH_ADD_MODE_APPEND, /** Add line if prior contour is not closed */ @@ -96,7 +96,7 @@ typedef enum { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PathOpMode { /** * Difference operation. */ @@ -125,7 +125,7 @@ typedef enum { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PathMeasureMatrixFlags { /** * Gets position. */ diff --git a/graphic/graphic_2d/native_drawing/drawing_path_effect.h b/graphic/graphic_2d/native_drawing/drawing_path_effect.h index 214cea663c5a3ccd3f454c76b4e0e7faca62d578..5404ab650b85a75fd592df4632c869e8fe9a4e27 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_path_effect.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -52,7 +52,7 @@ extern "C" { * @since 18 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PathDashStyle { /** Indicates translation effect. */ DRAWING_PATH_DASH_STYLE_TRANSLATE, /** Indicates rotation effect. */ diff --git a/graphic/graphic_2d/native_drawing/drawing_pen.h b/graphic/graphic_2d/native_drawing/drawing_pen.h index 7465f4ebafab88b6f35210b83fa11910015328ba..6e1f015eec76248f13b6446431417d91eadc4f08 100644 --- a/graphic/graphic_2d/native_drawing/drawing_pen.h +++ b/graphic/graphic_2d/native_drawing/drawing_pen.h @@ -205,7 +205,7 @@ void OH_Drawing_PenSetMiterLimit(OH_Drawing_Pen* pen, float miter); * @since 8 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PenLineCapStyle { /** * There is no cap style. Both ends of the line segment are cut off square. */ @@ -251,7 +251,7 @@ void OH_Drawing_PenSetCap(OH_Drawing_Pen* pen, OH_Drawing_PenLineCapStyle capSty * @since 8 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_PenLineJoinStyle { /** * Mitered corner. If the angle of a polyline is small, its miter length may be inappropriate. * In this case, you need to use the miter limit to limit the miter length. diff --git a/graphic/graphic_2d/native_drawing/drawing_region.h b/graphic/graphic_2d/native_drawing/drawing_region.h index ea27f3bcef0a16ec05c722ade28d511fed68fdbf..482a930d34ca9eb54ad84a0529cccd6b74001d09 100644 --- a/graphic/graphic_2d/native_drawing/drawing_region.h +++ b/graphic/graphic_2d/native_drawing/drawing_region.h @@ -52,7 +52,7 @@ extern "C" { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_RegionOpMode { /** * Difference operation. */ diff --git a/graphic/graphic_2d/native_drawing/drawing_round_rect.h b/graphic/graphic_2d/native_drawing/drawing_round_rect.h index e3dec061fcde5f4d778ac639aa799bb147bde934..6b5e5e9958cae53b5a94072e47eb5c5ea7d91d27 100644 --- a/graphic/graphic_2d/native_drawing/drawing_round_rect.h +++ b/graphic/graphic_2d/native_drawing/drawing_round_rect.h @@ -53,7 +53,7 @@ extern "C" { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_CornerPos { /** * Index of top-left corner radii. */ diff --git a/graphic/graphic_2d/native_drawing/drawing_sampling_options.h b/graphic/graphic_2d/native_drawing/drawing_sampling_options.h index 12a90a087976fd9ac76ee607786ac032dc9b9d44..fcac9a03ace93af6c2c751d854a86e9b19cad012 100644 --- a/graphic/graphic_2d/native_drawing/drawing_sampling_options.h +++ b/graphic/graphic_2d/native_drawing/drawing_sampling_options.h @@ -52,7 +52,7 @@ extern "C" { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_FilterMode { /** single sample point (nearest neighbor) */ FILTER_MODE_NEAREST, /** interporate between 2x2 sample points (bilinear interpolation) */ @@ -65,7 +65,7 @@ typedef enum { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_MipmapMode { /** ignore mipmap levels, sample from the "base" */ MIPMAP_MODE_NONE, /** sample from the nearest level */ diff --git a/graphic/graphic_2d/native_drawing/drawing_shader_effect.h b/graphic/graphic_2d/native_drawing/drawing_shader_effect.h index b42156a5fcde2a861d16cb6ea73164452a1059fb..4034af2c04537c406d87628e6c3c0abc153534eb 100644 --- a/graphic/graphic_2d/native_drawing/drawing_shader_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_shader_effect.h @@ -52,7 +52,7 @@ extern "C" { * @since 11 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_TileMode { /** * Replicate the edge color if the shader effect draws outside of its original bounds. */ diff --git a/graphic/graphic_2d/native_drawing/drawing_text_blob.h b/graphic/graphic_2d/native_drawing/drawing_text_blob.h index 5a0dbdfd6fcd7e2dabb803489953c87d1d24bde6..0ef1fbdb1cf14f6c7d797582f7a120989d14e5d7 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_blob.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_blob.h @@ -129,7 +129,7 @@ uint32_t OH_Drawing_TextBlobUniqueID(const OH_Drawing_TextBlob* textBlob); * @since 11 * @version 1.0 */ -typedef struct { +typedef struct OH_Drawing_RunBuffer { /** storage for glyph indexes in run */ uint16_t* glyphs; /** storage for glyph positions in run */ diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h index 65a39f67298c7ddae2e31dad9a64bc39d7314fc7..0b6f72dcc62e7a7f66772faa350746180e69e339 100644 --- a/graphic/graphic_2d/native_drawing/drawing_types.h +++ b/graphic/graphic_2d/native_drawing/drawing_types.h @@ -127,7 +127,7 @@ typedef struct OH_Drawing_ColorSpace OH_Drawing_ColorSpace; * @since 12 * @version 1.0 */ -typedef struct { +typedef struct OH_Drawing_Point2D { float x; float y; } OH_Drawing_Point2D; @@ -146,7 +146,7 @@ typedef OH_Drawing_Point2D OH_Drawing_Corner_Radii; * @since 12 * @version 1.0 */ -typedef struct { +typedef struct OH_Drawing_Point3D { float x; float y; float z; @@ -319,7 +319,7 @@ typedef struct OH_Drawing_Surface OH_Drawing_Surface; * @since 8 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_ColorFormat { /** Unknown format. */ COLOR_FORMAT_UNKNOWN, /** Each pixel is represented by 8 bits, which together indicate alpha. */ @@ -352,7 +352,7 @@ typedef enum { * @since 8 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_AlphaFormat { /** Unknown format. */ ALPHA_FORMAT_UNKNOWN, /** The bitmap does not have the alpha component. */ @@ -382,7 +382,7 @@ typedef enum { * @since 11 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_BlendMode { /** r = 0. */ BLEND_MODE_CLEAR, /** r = s. */ @@ -449,7 +449,7 @@ typedef enum { * @since 12 * @version 1.0 */ -typedef struct { +typedef struct OH_Drawing_Image_Info { /** storage for width of image */ int32_t width; /** storage for height of image */ @@ -466,7 +466,7 @@ typedef struct { * @since 12 * @version 1.0 */ -typedef struct { +typedef struct OH_Drawing_RectStyle_Info { /** color of rectstyle */ uint32_t color; /** radius in left top of rectstyle */ @@ -485,7 +485,7 @@ typedef struct { * @since 14 * @version 1.0 */ -typedef struct { +typedef struct OH_Drawing_String { /** A pointer to a byte string containing UTF-16 encoded entities */ uint8_t* strData; /** The length of `strData` in bytes */ @@ -497,7 +497,7 @@ typedef struct { * @since 12 * @version 1.0 */ -typedef enum { +typedef enum OH_Drawing_TextEncoding { /** uses bytes to represent UTF-8 or ASCII */ TEXT_ENCODING_UTF8, /** uses two byte words to represent most of Unicode */