From 38b40a1f82b6951d2e8db48b8db44a3a3fde3227 Mon Sep 17 00:00:00 2001 From: huqingyun Date: Mon, 29 Apr 2024 14:01:37 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9ENODE=5FRENDER=5FFIT=E3=80=81N?= =?UTF-8?q?ODE=5FOUTLINE=5FCOLOR=E3=80=81NODE=5FSIZE=E3=80=81NODE=5FRENDER?= =?UTF-8?q?=5FGROUP=E3=80=81NODE=5FCOLOR=5FBLEND=E3=80=81NODE=5FFOREGROUND?= =?UTF-8?q?=5FBLUR=5FSTYLE=E3=80=81=E9=80=9A=E7=94=A8=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huqingyun Change-Id: I577b682c0cda22b5017fe523607a90be4b4f4c56 --- arkui/ace_engine/native/native_node.h | 90 +++++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 44 +++++++++++++ 2 files changed, 134 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c1fc53bc0..9c9dbb2e7 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1370,6 +1370,95 @@ typedef enum { */ NODE_ASPECT_RATIO, + /** + * @brief Set the component content filling method in the process of width and height animation, support property setting, property reset, property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32 Content filling mode {@link ArkUI_RenderFit}.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32 Content filling mode {@link ArkUI_RenderFit}.\n + * + */ + NODE_RENDER_FIT, + + /** + * @brief External stroke color properties, support property setting, property reset and property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * 1: .value[0].u32: Set the border color of the four sides uniformly, using 0xargb, such as 0xFFFF11FF. \n + * 2: .value[0].u32: Set the top border color, represented by 0xargb, such as 0xFFFF11FF. \n + * .value[1].u32: Set the right border color, represented by 0xargb, such as 0xFFFF11FF. \n + * .value[2].u32: Set the lower side box color, denoted by 0xargb, such as 0xFFFF11FF. \n + * .value[3].u32: Set the left border color, denoted by 0xargb, such as 0xFFFF11FF. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: Set the top border color, represented by 0xargb, such as 0xFFFF11FF. \n + * .value[1].u32: Set the right border color, represented by 0xargb, such as 0xFFFF11FF. \n + * .value[2].u32: Set the lower side box color, denoted by 0xargb, such as 0xFFFF11FF. \n + * .value[3].u32: Set the left border color, denoted by 0xargb, such as 0xFFFF11FF. \n + * + */ + NODE_OUTLINE_COLOR, + + /** + * @brief Set the height and width dimensions, support property setting, property reset and property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: Width value, unit is vp;\n + * .value[1].f32: Height value, unit is vp;\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: Width value, unit is vp;\n + * .value[1].f32: Height value, unit is vp;\n + * + */ + NODE_SIZE, + + /** + * @brief Set whether the current component and child component are rendered off the screen first and then fused with the parent control, supporting property setting, property reset and property acquisition. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: The parameter type is 1 or 0. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: The parameter type is 1 or 0. + * + */ + NODE_RENDER_GROUP, + + /** + * @brief Add color overlay effect to components, support property setting, property reset and property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: The color of the overlay is represented by 0xargb, such as 0xFFFF11FF. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: The color of the overlay is represented by 0xargb, such as 0xFFFF11FF. \n + * + */ + NODE_COLOR_BLEND, + + /** + * @brief Provide content ambiguity capability for the current component, support property setting, property reset, property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32 Represents the content blurring style, and uses the {@link ArkUI_BlurStyle} enumeration value.\n + * .value[1]?.i32 Represents the dark and light mode used by the content blur effect, with the {@link ArkUI_ThemeColorMode} enumeration value.\n + * .value[2]?.i32 The color extraction mode used to represent the content blur effect takes the {@link ArkUI_AdaptiveColor} enumeration value.\n + * .value[3]?.i32 It is a gray-level fuzzy parameter. The value range is [0,127].\n + * .value[4]?.i32 It is a gray-level fuzzy parameter. The value range is [0,127].\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32 Represents the content blurring style, and uses the {@link ArkUI_BlurStyle} enumeration value.\n + * .value[1].i32 Represents the dark and light mode used by the content blur effect, with the {@link ArkUI_ThemeColorMode} enumeration value.\n + * .value[2].i32 The color extraction mode used to represent the content blur effect takes the {@link ArkUI_AdaptiveColor} enumeration value.\n + * .value[3].i32 It is a gray-level fuzzy parameter. The value range is [0,127].\n + * .value[4].i32 It is a gray-level fuzzy parameter. The value range is [0,127].\n + * + */ + NODE_FOREGROUND_BLUR_STYLE, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * @@ -1436,6 +1525,7 @@ typedef enum { * */ NODE_TEXT_LINE_HEIGHT, + /** * @brief Defines the text decoration style and color. * This attribute can be set, reset, and obtained as required through APIs. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index f9038b369..873bf970c 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1446,6 +1446,50 @@ typedef enum { ARKUI_LENGTH_METRIC_UNIT_FP } ArkUI_LengthMetricUnit; +typedef enum { + /** Maintains the content size of the animation's final state, and the content is always centered with the component.*/ + ARKUI_RENDER_FIT_CENTER = 0, + /** Maintains the content size of the animation's final state, and the content is always aligned with the top center of the component. */ + ARKUI_RENDER_FIT_TOP, + /** Maintains the content size of the animation's final state, and the content is always aligned with the bottom center of the component. */ + ARKUI_RENDER_FIT_BOTTOM, + /** Maintains the content size of the animation's final state, and the content is always aligned to the left of the component. */ + ARKUI_RENDER_FIT_LEFT, + /** Maintains the content size of the animation's final state, and the content is always right-aligned with the component. */ + ARKUI_RENDER_FIT_RIGHT, + /** Maintains the content size of the animation's final state, and the content is always aligned with the top left corner of the component. */ + ARKUI_RENDER_FIT_TOP_LEFT, + /** Keep the content size of the animation final state, and the content is always aligned with the upper right corner of the component. */ + ARKUI_RENDER_FIT_TOP_RIGHT, + /** Keep the content size of the animation final state, and the content always aligns with the lower-left corner of the component. */ + ARKUI_RENDER_FIT_BOTTOM_LEFT, + /** Keep the content size of the animation final state, and the content always aligns with the lower-right corner of the component. */ + ARKUI_RENDER_FIT_BOTTOM_RIGHT, + /** The aspect ratio of the animation's final state content is not considered, and the content is always scaled to the size of the component. */ + ARKUI_RENDER_FIT_RESIZE_FILL, + /** Reduce or enlarge the aspect ratio of the animation final state content, so that the content is fully displayed in the component, and keep the center aligned with the component. */ + ARKUI_RENDER_FIT_RESIZE_CONTAIN, + /** Keep the aspect ratio of the animation final state content to reduce or enlarge, so that the content is fully displayed in the component. When there is left over in the broad direction of the component, the content is aligned to the left of the component, and when there is left over in the high direction of the component, the content is aligned to the top of the component. */ + ARKUI_RENDER_FIT_RESIZE_CONTAIN_TOP_LEFT, + /** Keep the aspect ratio of the animation final state content to reduce or enlarge, so that the content is fully displayed in the component. When there is left in the wide direction of the component, the content is aligned with the component on the right. When there is left in the high direction of the component, the content is aligned with the component on the bottom. */ + ARKUI_RENDER_FIT_RESIZE_CONTAIN_BOTTOM_RIGHT, + /** Keep the aspect ratio of the animation final state content reduced or enlarged, so that both sides of the content are greater than or equal to both sides of the component, and keep the center aligned with the component to display the middle part of the content. */ + ARKUI_RENDER_FIT_RESIZE_COVER, + /** Keep the aspect ratio of the final content of the animation reduced or enlarged so that both sides of the content are exactly greater than or equal to both sides of the component. When the content width is left, the content is aligned to the left of the component, and the left portion of the content is displayed. When the content is left in the high direction, the content and the component remain top aligned, showing the top side of the content. */ + ARKUI_RENDER_FIT_RESIZE_COVER_TOP_LEFT, + /** Keep the aspect ratio of the final content of the animation reduced or enlarged so that both sides of the content are exactly greater than or equal to both sides of the component. When the content width is left, the content and the component remain right aligned, and the right part of the content is displayed. When the content is left in the high direction, the content and the component remain aligned at the bottom, and the bottom part of the content is displayed. */ + ARKUI_RENDER_FIT_RESIZE_COVER_BOTTOM_RIGHT +} ArkUI_RenderFit; + +typedef enum { + /** Follow the system dark light mode. */ + ARKUI_THEME_COLOR_MODE_SYSTEM = 0, + /** Fixed use light color mode. */ + ARKUI_THEME_COLOR_MODE_LIGHT, + /** Fixed use dark mode. */ + ARKUI_THEME_COLOR_MODE_DARK +} ArkUI_ThemeColorMode; + /** * @brief Creates a size constraint. * -- Gitee