Defines the visual types for the native module.
File to include: <arkui/native_type_visual.h>
Library: libace_ndk.z.so
System capability: SystemCapability.ArkUI.ArkUI.Full
Since: 12
Related module: ArkUI_NativeModule
| Name | typedef Keyword | Description |
|---|---|---|
| ArkUI_TranslationOptions | ArkUI_TranslationOptions | Defines the translation options for component transition, used to set the translation distance of a component in the x, y, and z directions during the transition. |
| ArkUI_ScaleOptions | ArkUI_ScaleOptions | Defines the scale options for component transition. |
| ArkUI_RotationOptions | ArkUI_RotationOptions | Defines the rotation options for component transition. |
| ArkUI_MotionPathOptions | ArkUI_MotionPathOptions | Defines the motion path configuration options of path animation, which are used to set the trajectory and related parameters of a component moving along a specified path during animation, so that the component can perform displacement animation along the preset motion path. |
| ArkUI_Matrix4 | ArkUI_Matrix4 | Defines a four-order matrix object used to describe matrix transformation operations such as translation, rotation, and scaling of UI components. For details, see ArkUI_NativeModule. |
| ArkUI_PointF | ArkUI_PointF | Defines a two-dimensional coordinate point, used to describe coordinate information such as the component position or offset. The coordinates are stored as floating-point numbers. |
| ArkUI_Matrix4RotationOptions | ArkUI_Matrix4RotationOptions | Defines matrix rotation options. |
| ArkUI_Matrix4ScaleOptions | ArkUI_Matrix4ScaleOptions | Defines the configuration options for 4 × 4 matrix scaling. For details about the parameters and their value principles, see member variable descriptions. |
| ArkUI_Matrix4TranslationOptions | ArkUI_Matrix4TranslationOptions | Defines the configuration options for matrix translation. |
| OH_ArkUI_ShadowOptions | OH_ArkUI_ShadowOptions | Defines shadow options. |
| Name | typedef Keyword | Description |
|---|---|---|
| ArkUI_ShadowType | ArkUI_ShadowType | Enumerates shadow types. |
| ArkUI_ShadowStyle | ArkUI_ShadowStyle | Enumerates shadow styles. |
| ArkUI_AnimationCurve | ArkUI_AnimationCurve | Enumerates animation curves. |
| ArkUI_AnimationPlayMode | ArkUI_AnimationPlayMode | Enumerates animation playback modes. |
| ArkUI_BlurStyle | ArkUI_BlurStyle | Enumerates blur styles. |
| ArkUI_BlurStyleActivePolicy | ArkUI_BlurStyleActivePolicy | Enumerates the activation policies for the background blur effect. |
| ArkUI_BlendMode | ArkUI_BlendMode | Enumerates blend modes. |
| ArkUI_ColorStrategy | ArkUI_ColorStrategy | Enumerates foreground and shadow colors. |
| ArkUI_MaskType | ArkUI_MaskType | Enumerates mask types. A mask is a means to limit the display area of a component. It uses a specific shape to crop the component content so that only the content in the mask area is visible. |
| ArkUI_ClipType | ArkUI_ClipType | Enumerates clipping region types. |
| ArkUI_ShapeType | ArkUI_ShapeType | Enumerates shape types. |
| ArkUI_LinearGradientDirection | ArkUI_LinearGradientDirection | Enumerates gradient directions. |
| ArkUI_TransitionEdge | ArkUI_TransitionEdge | Enumerates the slide-in and slide-out positions of the component from the screen edge during transition. |
| ArkUI_FinishCallbackType | ArkUI_FinishCallbackType | Enumerates the callback types for OH_ArkUI_AnimatorOption_RegisterOnFinishCallback in an animation. |
| ArkUI_BlendApplyType | ArkUI_BlendApplyType | Enumerates how the blending mode is applied to the view content. |
| ArkUI_RenderFit | ArkUI_RenderFit | Enumerates the sizing and positioning behaviors of animated content in its final state. |
| ArkUI_AnimationDirection | ArkUI_AnimationDirection | Enumerates animation playback directions. |
| ArkUI_AnimationFillMode | ArkUI_AnimationFillMode | Enumerates the states before and after execution of the frame-by-frame animation. |
| Name | Return Value | Description |
|---|---|---|
| ArkUI_Matrix4ScaleOptions* OH_ArkUI_Matrix4ScaleOptions_Create() | - | Creates a pointer to the scaling parameter object for matrix operations. In the newly created object, the default scaling factors in the x, y, and z directions are 1, and the default x-axis offset (centerX) and y-axis offset (centerY) of a single matrix transformation center point relative to a component transformation center point are 0. |
| void OH_ArkUI_Matrix4ScaleOptions_Dispose(ArkUI_Matrix4ScaleOptions* options) | - | Disposes of the pointer to the scaling parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetX(ArkUI_Matrix4ScaleOptions* options, const float scaleX) | - | Sets the scaling factor in the x direction of the scaling parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetX(const ArkUI_Matrix4ScaleOptions* options, float* scaleX) | - | Obtains the scaling factor in the x direction of the scaling parameter object for matrix operations. If the value of x is not set, the default value of the scaling factor in the x direction is 1. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetY(ArkUI_Matrix4ScaleOptions* options, const float scaleY) | - | Sets the scaling factor in the y direction of the scaling parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetY(const ArkUI_Matrix4ScaleOptions* options, float* scaleY) | - | Obtains the scaling factor in the y direction of the scaling parameter object for matrix operations. If the value of y is not set, the default value of the scaling factor in the y direction is 1. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetZ(ArkUI_Matrix4ScaleOptions* options, const float scaleZ) | - | Sets the scaling factor in the z direction of the scaling parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetZ(const ArkUI_Matrix4ScaleOptions* options, float* scaleZ) | - | Obtains the scaling factor in the z direction of the scaling parameter object for matrix operations. If the value of z is not set, the default value of the scaling factor in the z direction is 1. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetCenterX(ArkUI_Matrix4ScaleOptions* options, const float centerX) | - | Sets the x coordinate of the transformation center point of the scaling parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetCenterX(const ArkUI_Matrix4ScaleOptions* options, float* centerX) | - | Obtains the x coordinate of the transformation center point of the scaling parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetCenterY(ArkUI_Matrix4ScaleOptions* options, const float centerY) | - | Sets the y coordinate of the transformation center point of the scaling parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetCenterY(const ArkUI_Matrix4ScaleOptions* options, float* centerY) | - | Obtains the y coordinate of the transformation center point of the scaling parameter object for matrix operations. |
| ArkUI_Matrix4RotationOptions* OH_ArkUI_Matrix4RotationOptions_Create() | - | Creates a pointer to the rotation parameter object for matrix operations. In the newly created object, centerX (x-axis offset of a single matrix transformation center point relative to a component transformation center point), centerY (y-axis offset), and the rotation angle are all set to 0 by default. If the vectors in x, y, and z directions are not specified, the default vectors are 0, 0, and 1 in the three directions, respectively (indicating the rotation around the z-axis). Once the vector in any direction is specified, the unspecified vectors in other directions are equal to 0. |
| void OH_ArkUI_Matrix4RotationOptions_Dispose(ArkUI_Matrix4RotationOptions* options) | - | Disposes of the pointer to the rotation parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetX(ArkUI_Matrix4RotationOptions* options, const float x) | - | Sets the direction vector in the x direction of the rotation parameter object for matrix operations. Once any direction vector (x, y, or z) is specified, the values of the other unspecified direction vectors are equivalent to 0. If none of the direction vectors is specified, the default values are equivalent to x=0, y=0, and z=1, indicating rotation around the z-axis. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetX(const ArkUI_Matrix4RotationOptions* options, float* x) | - | Obtains the direction vector in the x direction of the rotation parameter object for matrix operations. If the value of x has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned. Set the value of x by calling OH_ArkUI_Matrix4RotationOptions_SetX before calling this API. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetY(ArkUI_Matrix4RotationOptions* options, const float y) | - | Sets the direction vector in the y direction of the rotation parameter object for matrix operations. Once any direction vector (x, y, or z) is specified, the values of the other unspecified direction vectors are equivalent to 0. If none of the direction vectors is specified, the default values are equivalent to x=0, y=0, and z=1, indicating rotation around the z-axis. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetY(const ArkUI_Matrix4RotationOptions* options, float* y) | - | Obtains the direction vector in the y direction of the rotation parameter object for matrix operations. If the value of y has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetZ(ArkUI_Matrix4RotationOptions* options, const float z) | - | Sets the direction vector in the z direction of the rotation parameter object for matrix operations. Once any direction vector (x, y, or z) is specified, the values of the other unspecified direction vectors are equivalent to 0. If none of the direction vectors is specified, the default values are equivalent to x=0, y=0, and z=1, indicating rotation around the z-axis. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetZ(const ArkUI_Matrix4RotationOptions* options, float* z) | - | Obtains the direction vector in the z direction of the rotation parameter object for matrix operations. If the value of z has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetAngle(ArkUI_Matrix4RotationOptions* options, const float angle) | - | Sets the rotation angle in the rotation parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetAngle(const ArkUI_Matrix4RotationOptions* options, float* angle) | - | Obtains the rotation angle in the rotation parameter object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetCenterX(ArkUI_Matrix4RotationOptions* options, const float centerX) | - | Sets the x-axis offset of a single matrix transformation center point relative to a component transformation center point. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetCenterX(const ArkUI_Matrix4RotationOptions* options, float* centerX) | - | Obtains the x-axis offset of a single matrix transformation center point relative to a component transformation center point. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetCenterY(ArkUI_Matrix4RotationOptions* options, const float centerY) | - | Sets the y-axis offset of a single matrix transformation center point relative to a component transformation center point. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetCenterY(const ArkUI_Matrix4RotationOptions* options, float* centerY) | - | Obtains the y-axis offset of a single matrix transformation center point relative to a component transformation center point. |
| ArkUI_Matrix4TranslationOptions* OH_ArkUI_Matrix4TranslationOptions_Create() | - | Creates a pointer to a translation object for matrix operations. In the newly created object, the default translation distances on the x, y, and z axes are 0. |
| void OH_ArkUI_Matrix4TranslationOptions_Dispose(ArkUI_Matrix4TranslationOptions* options) | - | Disposes of the pointer to the translation object for matrix operations. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetX(ArkUI_Matrix4TranslationOptions* options, const float x) | - | Sets the translation value of a translation object on the x-axis for matrix operations, in px. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetX(const ArkUI_Matrix4TranslationOptions* options, float* x) | - | Obtains the translation value of a translation object on the x-axis for matrix operations, in px. If the value of x has never been set, the default value is 0. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetY(ArkUI_Matrix4TranslationOptions* options, const float y) | - | Sets the translation value of a translation object on the y-axis for matrix operations, in px. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetY(const ArkUI_Matrix4TranslationOptions* options, float* y) | - | Obtains the translation value of a translation object on the y-axis for matrix operations, in px. If the value of y has never been set, the default value is 0. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetZ(ArkUI_Matrix4TranslationOptions* options, const float z) | - | Sets the translation value of a translation object on the z-axis for matrix operations, in px. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetZ(const ArkUI_Matrix4TranslationOptions* options, float* z) | - | Obtains the translation value of a translation object on the z-axis for matrix operations, in px. If the value of z has never been set, the default value is 0. |
| ArkUI_Matrix4* OH_ArkUI_Matrix4_CreateIdentity() | - | Creates a fourth-order identity matrix object. When the object is no longer used, call OH_ArkUI_Matrix4_Dispose to dispose of it. |
| ArkUI_Matrix4* OH_ArkUI_Matrix4_CreateByElements(const float* elements) | - | Creates a fourth-order matrix object by specifying each element of the matrix. When the object is no longer used, call OH_ArkUI_Matrix4_Dispose to dispose of it. |
| void OH_ArkUI_Matrix4_Dispose(ArkUI_Matrix4* matrix) | - | Disposes of the pointer to the matrix object. |
| ArkUI_Matrix4* OH_ArkUI_Matrix4_Copy(const ArkUI_Matrix4* matrix) | - | Creates a copy of a fourth-order matrix object, which is used to perform operations on the same matrix to obtain different matrix objects. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_Invert(ArkUI_Matrix4* matrix) | - | Performs an inverse matrix transformation on the input matrix. The input matrix object will be modified after the transformation. This API will modify the input matrix object. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_Combine(ArkUI_Matrix4* oriMatrix, const ArkUI_Matrix4* anotherMatrix) | - | Combines another matrix with the original matrix and stores the result matrix in oriMatrix. In this case, the result matrix applies the transformation of oriMatrix and then applies the transformation of anotherMatrix. This API will modify the oriMatrix object. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_Translate(ArkUI_Matrix4* matrix, const ArkUI_Matrix4TranslationOptions* translate) | - | Applies translation transformation to the original matrix to obtain the translated matrix. Each translation transformation is accumulated on the previous matrix. The input matrix object will be modified after the transformation. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_Scale(ArkUI_Matrix4* matrix, const ArkUI_Matrix4ScaleOptions* scale) | - | Applies scaling transformation to the original matrix to obtain the scaled matrix. Each scaling transformation is accumulated on the previous matrix. This API will modify the input matrix object. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_Rotate(ArkUI_Matrix4* matrix, const ArkUI_Matrix4RotationOptions* rotate) | - | Applies rotation transformation to the original matrix to obtain the rotated matrix. Each rotation transformation is accumulated on the previous matrix. This API will modify the input matrix object. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_Skew(ArkUI_Matrix4* matrix, const float skewX, const float skewY) | - | Applies skew transformation to the original matrix to obtain the skewed matrix. Each skew transformation is accumulated on the previous matrix. The input matrix object will be modified after the transformation. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_TransformPoint(const ArkUI_Matrix4* matrix, const ArkUI_PointF* oriPoint, ArkUI_PointF* result) | - | Calculates the new coordinates of a point after matrix transformation. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_SetPolyToPoly(ArkUI_Matrix4* matrix, const ArkUI_PointF* src, const ArkUI_PointF* dst, const uint32_t pointCount) | - | Maps the vertex coordinates of a polygon to those of another polygon and calculates the required matrix. The value of pointCount determines the type of transformation to be calculated: The value 0 indicates an identity matrix transformation, 1 indicates translation, 2 indicates rotation or scaling, 3 indicates an affine transformation, and 4 indicates a perspective transformation. If any other value is passed, ARKUI_ERROR_CODE_PARAM_INVALID is returned. |
| ArkUI_ErrorCode OH_ArkUI_Matrix4_GetElements(const ArkUI_Matrix4* matrix, float* result) | - | Obtains the 16 elements of a fourth-order matrix. The array is stored in row-major order. The length must be greater than or equal to 16. Otherwise, undefined behavior occurs. |
| ArkUI_MotionPathOptions* OH_ArkUI_MotionPathOptions_Create() | - | Creates motion path options for a path animation. When the object is no longer used, call OH_ArkUI_MotionPathOptions_Dispose to dispose of it. |
| void OH_ArkUI_MotionPathOptions_Dispose(ArkUI_MotionPathOptions* options) | - | Disposes of motion path options of the path animation. |
| ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetPath(ArkUI_MotionPathOptions* options, const char* svgPath) | - | Sets the motion path of a path animation. |
| ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetPath(const ArkUI_MotionPathOptions* options, char* svgPathBuffer, const int32_t bufferSize, int32_t* writeLength) | - | Obtains the motion path string stored in the motion path configuration item of the path animation. |
| ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetFrom(ArkUI_MotionPathOptions* options, const float from) | - | Sets the start progress of a path animation. The progress refers to the ratio of the distance already moved along the path to the total path length. |
| ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetFrom(const ArkUI_MotionPathOptions* options, float* from) | - | Obtains the start progress of the path animation in the motion path configuration item. |
| ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetTo(ArkUI_MotionPathOptions* options, const float to) | - | Sets the end progress of a path animation. The progress refers to the ratio of the distance already moved along the path to the total path length. |
| ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetTo(const ArkUI_MotionPathOptions* options, float* to) | - | Obtains the end progress of the path animation in the motion path configuration item. |
| ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetRotatable(ArkUI_MotionPathOptions* options, const bool rotatable) | - | Sets whether a component rotates along the motion path. |
| ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetRotatable(const ArkUI_MotionPathOptions* options, bool* rotatable) | - | Obtains whether the component rotates along the motion path. |
| OH_ArkUI_ShadowOptions* OH_ArkUI_ShadowOptions_Create() | - | Creates a shadow option object. In the newly created object, the default value of the blur radius (radius) is 0, the default value of the shadow type (type) is ARKUI_SHADOW_TYPE_COLOR, the default value of the shadow color (color) is 0xFF000000, the default value of the x-axis offset (offsetX) is 0, the default value of the y-axis offset (offsetY) is 0, and the default value of isFill is false. If the object is no longer used, call OH_ArkUI_ShadowOptions_Destroy to destroy it. |
| void OH_ArkUI_ShadowOptions_Destroy(OH_ArkUI_ShadowOptions* options) | - | Destroys the shadow option object. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetRadius(OH_ArkUI_ShadowOptions* options, float radius) | - | Sets the blur radius for the shadow options. The value range is [0, +∞), in vp. If a negative value is passed, ARKUI_ERROR_CODE_PARAM_INVALID is returned. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetRadius(OH_ArkUI_ShadowOptions* options, float* radius) | - | Obtains the blur radius of the shadow options. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetType(OH_ArkUI_ShadowOptions* options, ArkUI_ShadowType type) | - | Sets the shadow type for the shadow options. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetType(OH_ArkUI_ShadowOptions* options, ArkUI_ShadowType* type) | - | Obtains the shadow type of the shadow options. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetColor(OH_ArkUI_ShadowOptions* options, uint32_t color) | - | Sets the shadow color for the shadow options. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetColor(OH_ArkUI_ShadowOptions* options, uint32_t* color) | - | Obtains the shadow color of the shadow options. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetOffsetX(OH_ArkUI_ShadowOptions* options, float offsetX) | - | Sets the shadow offset on the x-axis. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetOffsetX(OH_ArkUI_ShadowOptions* options, float* offsetX) | - | Obtains the shadow offset on the x-axis. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetOffsetY(OH_ArkUI_ShadowOptions* options, float offsetY) | - | Sets the shadow offset on the y-axis. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetOffsetY(OH_ArkUI_ShadowOptions* options, float* offsetY) | - | Obtains the shadow offset on the y-axis. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetFill(OH_ArkUI_ShadowOptions* options, bool isFill) | - | Sets whether to fill a component with a shadow. |
| ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetFill(OH_ArkUI_ShadowOptions* options, bool* isFill) | - | Obtains whether a component is filled with a shadow. |
enum ArkUI_ShadowType
Description
Enumerates shadow types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SHADOW_TYPE_COLOR = 0 | Color shadow. |
| ARKUI_SHADOW_TYPE_BLUR = 1 | Blur shadow. |
enum ArkUI_ShadowStyle
Description
Enumerates shadow styles.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SHADOW_STYLE_OUTER_DEFAULT_XS = 0 | Mini shadow.
|
| ARKUI_SHADOW_STYLE_OUTER_DEFAULT_SM = 1 | Small shadow.
|
| ARKUI_SHADOW_STYLE_OUTER_DEFAULT_MD = 2 | Medium shadow.
|
| ARKUI_SHADOW_STYLE_OUTER_DEFAULT_LG = 3 | Large shadow.
|
| ARKUI_SHADOW_STYLE_OUTER_FLOATING_SM = 4 | Floating small shadow.
|
| ARKUI_SHADOW_STYLE_OUTER_FLOATING_MD = 5 | Floating medium shadow.
|
enum ArkUI_AnimationCurve
Description
Enumerates animation curves.
Since: 12
| Value | Description |
|---|---|
| ARKUI_CURVE_LINEAR = 0 | The animation speed keeps unchanged. |
| ARKUI_CURVE_EASE = 1 | The animation starts slowly, accelerates, and then slows down towards the end. |
| ARKUI_CURVE_EASE_IN = 2 | The animation starts at a low speed and then picks up speed until the end. |
| ARKUI_CURVE_EASE_OUT = 3 | The animation ends at a low speed. |
| ARKUI_CURVE_EASE_IN_OUT = 4 | The animation starts and ends at a low speed, providing a smooth and natural transition. |
| ARKUI_CURVE_FAST_OUT_SLOW_IN = 5 | The animation uses the standard curve. |
| ARKUI_CURVE_LINEAR_OUT_SLOW_IN = 6 | The animation uses the deceleration curve. |
| ARKUI_CURVE_FAST_OUT_LINEAR_IN = 7 | The animation uses the acceleration curve. |
| ARKUI_CURVE_EXTREME_DECELERATION = 8 | The animation uses the extreme deceleration curve. |
| ARKUI_CURVE_SHARP = 9 | The animation uses the sharp curve. |
| ARKUI_CURVE_RHYTHM = 10 | The animation uses the rhythm curve. |
| ARKUI_CURVE_SMOOTH = 11 | The animation uses the smooth curve. |
| ARKUI_CURVE_FRICTION = 12 | The animation uses the friction curve. |
enum ArkUI_AnimationPlayMode
Description
Enumerates animation playback modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ANIMATION_PLAY_MODE_NORMAL = 0 | The animation is played forwards. |
| ARKUI_ANIMATION_PLAY_MODE_REVERSE = 1 | The animation is played backwards. |
| ARKUI_ANIMATION_PLAY_MODE_ALTERNATE = 2 | The animation plays in alternating loop mode. When the animation is played for an odd number of times, the playback is in forward direction. When the animation is played for an even number of times, the playback is in reverse direction. |
| ARKUI_ANIMATION_PLAY_MODE_ALTERNATE_REVERSE = 3 | The animation plays in reverse alternating loop mode. When the animation is played for an odd number of times, the playback is in reverse direction. When the animation is played for an even number of times, the playback is in forward direction. |
enum ArkUI_BlurStyle
Description
Enumerates blur styles.
Since: 12
| Value | Description |
|---|---|
| ARKUI_BLUR_STYLE_THIN = 0 | Thin material.
|
| ARKUI_BLUR_STYLE_REGULAR = 1 | Regular material.
|
| ARKUI_BLUR_STYLE_THICK = 2 | Thick material.
|
| ARKUI_BLUR_STYLE_BACKGROUND_THIN = 3 | Material that creates the minimum depth of field effect.
|
| ARKUI_BLUR_STYLE_BACKGROUND_REGULAR = 4 | Material that creates a medium shallow depth of field effect.
|
| ARKUI_BLUR_STYLE_BACKGROUND_THICK = 5 | Material that creates a high shallow depth of field effect.
|
| ARKUI_BLUR_STYLE_BACKGROUND_ULTRA_THICK = 6 | Material that creates the maximum depth of field effect.
|
| ARKUI_BLUR_STYLE_NONE = 7 | No blur.
|
| ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THIN = 8 | Component ultra-thin material.
|
| ARKUI_BLUR_STYLE_COMPONENT_THIN = 9 | Component thin material.
|
| ARKUI_BLUR_STYLE_COMPONENT_REGULAR = 10 | Component regular material.
|
| ARKUI_BLUR_STYLE_COMPONENT_THICK = 11 | Component thick material.
|
| ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THICK = 12 | Component ultra-thick material.
|
enum ArkUI_BlurStyleActivePolicy
Description
Enumerates the activation policies for the background blur effect.
Since: 19
| Value | Description |
|---|---|
| ARKUI_BLUR_STYLE_ACTIVE_POLICY_FOLLOWS_WINDOW_ACTIVE_STATE = 0 | The blur effect changes according to the window's focus state; it is inactive when the window is not in focus and active when the window is in focus. |
| ARKUI_BLUR_STYLE_ACTIVE_POLICY_ALWAYS_ACTIVE = 1 | The blur effect is always active. |
| ARKUI_BLUR_STYLE_ACTIVE_POLICY_ALWAYS_INACTIVE = 2 | The blur effect is always inactive. |
enum ArkUI_BlendMode
Description
Enumerates blend modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_BLEND_MODE_NONE = 0 | The top image is superimposed on the bottom image without any blending. |
| ARKUI_BLEND_MODE_CLEAR = 1 | The target pixels covered by the source pixels are erased by being turned to completely transparent. |
| ARKUI_BLEND_MODE_SRC = 2 | r = s: Only the source pixels are displayed. |
| ARKUI_BLEND_MODE_DST = 3 | r = d: Only the target pixels are displayed. |
| ARKUI_BLEND_MODE_SRC_OVER = 4 | r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels. |
| ARKUI_BLEND_MODE_DST_OVER = 5 | r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels. |
| ARKUI_BLEND_MODE_SRC_IN = 6 | r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed. |
| ARKUI_BLEND_MODE_DST_IN = 7 | r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed. |
| ARKUI_BLEND_MODE_SRC_OUT = 8 | r = s * (1 - da): Only the part of the source pixels that do not overlap with the target pixels is displayed. |
| ARKUI_BLEND_MODE_DST_OUT = 9 | r = d * (1 - sa): Only the part of the target pixels that do not overlap with the source pixels is displayed. |
| ARKUI_BLEND_MODE_SRC_ATOP = 10 | r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed and the part of the target pixels that do not overlap with the source pixels are displayed. |
| ARKUI_BLEND_MODE_DST_ATOP = 11 | r = d * sa + s * (1 - da): The part of the target pixels that overlap with the source pixels and the part of the source pixels that do not overlap with the target pixels are displayed. |
| ARKUI_BLEND_MODE_XOR = 12 | r = s * (1 - da) + d * (1 - sa): Only the non-overlapping part between the source pixels and the target pixels is displayed. |
| ARKUI_BLEND_MODE_PLUS = 13 | r = min(s + d, 1): New pixels resulting from adding the source pixels to the target pixels are displayed. |
| ARKUI_BLEND_MODE_MODULATE = 14 | r = s * d: New pixels resulting from multiplying the source pixels with the target pixels are displayed. |
| ARKUI_BLEND_MODE_SCREEN = 15 | r = s + d - s * d: Pixels are blended by adding the source pixels to the target pixels and subtracting the product of their multiplication. |
| ARKUI_BLEND_MODE_OVERLAY = 16 | The MULTIPLY or SCREEN mode is used based on the target pixels. |
| ARKUI_BLEND_MODE_DARKEN = 17 | rc = s + d - max(s * da, d * sa), ra = kSrcOver: When two colors overlap, whichever is darker is used. |
| ARKUI_BLEND_MODE_LIGHTEN = 18 | rc = s + d - min(s * da, d * sa), ra = kSrcOver: The darker of the pixels (source and target) is used. |
| ARKUI_BLEND_MODE_COLOR_DODGE = 19 | The colors of the target pixels are lightened to reflect the source pixels. |
| ARKUI_BLEND_MODE_COLOR_BURN = 20 | The colors of the target pixels are darkened to reflect the source pixels. |
| ARKUI_BLEND_MODE_HARD_LIGHT = 21 | The MULTIPLY or SCREEN mode is used, depending on the source pixels. |
| ARKUI_BLEND_MODE_SOFT_LIGHT = 22 | The LIGHTEN or DARKEN mode is used, depending on the source pixels. |
| ARKUI_BLEND_MODE_DIFFERENCE = 23 | rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver: The final pixel is the result of subtracting the darker of the two pixels (source and target) from the lighter one, producing a high-contrast effect. |
| ARKUI_BLEND_MODE_EXCLUSION = 24 | rc = s + d - 2 * (s * d), ra = kSrcOver: The final pixel is the result of subtracting the darker of the two pixels (source and target) from the lighter one, producing a low-contrast visual effect. |
| ARKUI_BLEND_MODE_MULTIPLY = 25 | r = s * (1 - da) + d * (1 - sa) + s * d: The final pixel is the result of multiplying the source pixel by the target pixel. |
| ARKUI_BLEND_MODE_HUE = 26 | The resultant image is created with the luminance and saturation of the source image and the hue of the target image. |
| ARKUI_BLEND_MODE_SATURATION = 27 | The resultant image is created with the luminance and hue of the target image and the saturation of the source image. |
| ARKUI_BLEND_MODE_COLOR = 28 | The resultant image is created with the saturation and hue of the source image and the luminance of the target image. |
| ARKUI_BLEND_MODE_LUMINOSITY = 29 | The resultant image is created with the saturation and hue of the target image and the luminance of the source image. |
enum ArkUI_ColorStrategy
Description
Enumerates foreground and shadow colors.
Since: 12
| Value | Description |
|---|---|
| ARKUI_COLOR_STRATEGY_INVERT = 0 | The foreground colors are the inverse of the component background colors. |
| ARKUI_COLOR_STRATEGY_AVERAGE = 1 | The shadow colors of the component are the average color obtained from the component background shadow area. |
| ARKUI_COLOR_STRATEGY_PRIMARY = 2 | The shadow colors of the component are the primary color obtained from the component background shadow area. |
enum ArkUI_MaskType
Description
Enumerates mask types. A mask is a means to limit the display area of a component. It uses a specific shape to crop the component content so that only the content in the mask area is visible.
Since: 12
| Value | Description |
|---|---|
| ARKUI_MASK_TYPE_RECTANGLE = 0 | Rectangle. |
| ARKUI_MASK_TYPE_CIRCLE = 1 | Circle. |
| ARKUI_MASK_TYPE_ELLIPSE = 2 | Ellipse. |
| ARKUI_MASK_TYPE_PATH = 3 | Path. |
| ARKUI_MASK_TYPE_PROGRESS = 4 | Progress indicator. |
enum ArkUI_ClipType
Description
Enumerates clipping region types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_CLIP_TYPE_RECTANGLE = 0 | Rectangle. |
| ARKUI_CLIP_TYPE_CIRCLE = 1 | Circle. |
| ARKUI_CLIP_TYPE_ELLIPSE = 2 | Ellipse. |
| ARKUI_CLIP_TYPE_PATH = 3 | Path. |
enum ArkUI_ShapeType
Description
Enumerates shape types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SHAPE_TYPE_RECTANGLE = 0 | Rectangle. |
| ARKUI_SHAPE_TYPE_CIRCLE = 1 | Circle. |
| ARKUI_SHAPE_TYPE_ELLIPSE = 2 | Ellipse. |
| ARKUI_SHAPE_TYPE_PATH = 3 | Path. |
enum ArkUI_LinearGradientDirection
Description
Enumerates linear gradient directions.
Since: 12
| Value | Description |
|---|---|
| ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT = 0 | From right to left. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_TOP = 1 | From bottom to top. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT = 2 | From left to right. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_BOTTOM = 3 | From top to bottom. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_TOP = 4 | From lower right to upper left. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_BOTTOM = 5 | From upper right to lower left. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_TOP = 6 | From lower left to upper right. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_BOTTOM = 7 | From upper left to lower right. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_NONE = 8 | No gradient. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM = 9 | Custom direction. |
enum ArkUI_TransitionEdge
Description
Enumerates the slide-in and slide-out positions of the component from the screen edge during transition.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TRANSITION_EDGE_TOP = 0 | The component slides in and out from the top edge of the screen during transition. |
| ARKUI_TRANSITION_EDGE_BOTTOM = 1 | The component slides in and out from the bottom edge of the screen during transition. |
| ARKUI_TRANSITION_EDGE_START = 2 | The component slides in and out from the left edge of the screen during transition. |
| ARKUI_TRANSITION_EDGE_END = 3 | The component slides in and out from the right edge of the screen during transition. |
enum ArkUI_FinishCallbackType
Description
Enumerates the callback types for OH_ArkUI_AnimatorOption_RegisterOnFinishCallback in an animation.
Since: 12
| Value | Description |
|---|---|
| ARKUI_FINISH_CALLBACK_REMOVED = 0 | The callback is invoked when the entire animation is removed once it has finished. |
| ARKUI_FINISH_CALLBACK_LOGICALLY = 1 | The callback is invoked when the animation logically completes, though it may still be in its long tail state. The long tail state refers to the residual change process before the animation is completely stopped. In this state, the value change of the animation is very small and close to the target value. |
enum ArkUI_BlendApplyType
Description
Enumerates how the specified blend mode is applied.
Since: 12
| Value | Description |
|---|---|
| BLEND_APPLY_TYPE_FAST = 0 | The content of the view is blended in sequence on the target image. |
| BLEND_APPLY_TYPE_OFFSCREEN = 1 | The content of the component and its child components are drawn on the offscreen canvas, and then blended with the existing content on the canvas. |
enum ArkUI_RenderFit
Description
Enumerates the sizing and positioning behaviors of animated content in its final state.
Since: 12
| Value | Description |
|---|---|
| ARKUI_RENDER_FIT_CENTER = 0 | The component's content stays at the final size and always aligned with the center of the component. |
| ARKUI_RENDER_FIT_TOP = 1 | The component's content stays at the final size and always aligned with the top center of the component. |
| ARKUI_RENDER_FIT_BOTTOM = 2 | The component's content stays at the final size and always aligned with the bottom center of the component. |
| ARKUI_RENDER_FIT_LEFT = 3 | The component's content stays at the final size and always aligned with the left of the component. |
| ARKUI_RENDER_FIT_RIGHT = 4 | The component's content stays at the final size and always aligned with the right of the component. |
| ARKUI_RENDER_FIT_TOP_LEFT = 5 | The component's content stays at the final size and always aligned with the upper left corner of the component. |
| ARKUI_RENDER_FIT_TOP_RIGHT = 6 | The component's content stays at the final size and always aligned with the upper right corner of the component. |
| ARKUI_RENDER_FIT_BOTTOM_LEFT = 7 | The component's content stays at the final size and always aligned with the lower left corner of the component. |
| ARKUI_RENDER_FIT_BOTTOM_RIGHT = 8 | The component's content stays at the final size and always aligned with the lower right corner of the component. |
| ARKUI_RENDER_FIT_RESIZE_FILL = 9 | The component's content is always resized to fill the component's content box, without considering its aspect ratio in the final state. |
| ARKUI_RENDER_FIT_RESIZE_CONTAIN = 10 | While maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. It is always aligned with the center of the component. |
| ARKUI_RENDER_FIT_RESIZE_CONTAIN_TOP_LEFT = 11 | While maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. When there is remaining space in the width direction of the component, the content is left-aligned with the component. When there is remaining space in the height direction of the component, the content is top-aligned with the component. |
| ARKUI_RENDER_FIT_RESIZE_CONTAIN_BOTTOM_RIGHT = 12 | While maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. When there is remaining space in the width direction of the component, the content is right-aligned with the component. When there is remaining space in the height direction of the component, the content is bottom-aligned with the component. |
| ARKUI_RENDER_FIT_RESIZE_COVER = 13 | While maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. It is always aligned with the center of the component, so that its middle part is displayed. |
| ARKUI_RENDER_FIT_RESIZE_COVER_TOP_LEFT = 14 | While maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. When there is remaining space in the width direction, the content is left-aligned with the component, so that its left part is displayed. When there is remaining space in the height direction, the content is top-aligned with the component, so that its top part is displayed. |
| ARKUI_RENDER_FIT_RESIZE_COVER_BOTTOM_RIGHT = 15 | While maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. When there is remaining space in the width direction, the content is right-aligned with the component, so that its right part is displayed. When there is remaining space in the height direction, the content is bottom-aligned with the component, so that its bottom part is displayed. |
enum ArkUI_AnimationDirection
Description
Enumerates animation playback directions.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ANIMATION_DIRECTION_NORMAL = 0 | The animation plays in forward loop mode. |
| ARKUI_ANIMATION_DIRECTION_REVERSE = 1 | The animation plays in reverse loop mode. |
| ARKUI_ANIMATION_DIRECTION_ALTERNATE = 2 | The animation plays in alternating loop mode. When the animation is played for an odd number of times, the playback is in forward direction. When the animation is played for an even number of times, the playback is in reverse direction. |
| ARKUI_ANIMATION_DIRECTION_ALTERNATE_REVERSE = 3 | The animation plays in reverse alternating loop mode. When the animation is played for an odd number of times, the playback is in reverse direction. When the animation is played for an even number of times, the playback is in forward direction. |
enum ArkUI_AnimationFillMode
Description
Enumerates the states before and after execution of the frame-by-frame animation.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ANIMATION_FILL_MODE_NONE = 0 | Before execution, the animation does not apply any styles to the target component. After execution, the animation restores the target component to its default state. |
| ARKUI_ANIMATION_FILL_MODE_FORWARDS = 1 | The target component retains the state set by the last keyframe encountered during execution of the animation. |
| ARKUI_ANIMATION_FILL_MODE_BACKWARDS = 2 | The animation applies the values defined in the first keyframe once it is applied to the target component, and retains the values during the period set by delay. |
| ARKUI_ANIMATION_FILL_MODE_BOTH = 3 | The animation follows the rules of ARKUI_ANIMATION_FILL_MODE_FORWARDS and ARKUI_ANIMATION_FILL_MODE_BACKWARDS to extend the animation properties in both directions. |
ArkUI_Matrix4* OH_ArkUI_Matrix4_CreateIdentity()
Description
Creates a fourth-order identity matrix object.
Since: 24
Returns
| Type | Description |
|---|---|
| ArkUI_Matrix4* | Pointer to the created fourth-order identity matrix object. |
ArkUI_Matrix4* OH_ArkUI_Matrix4_CreateByElements(const float* elements)
Description
Creates a fourth-order matrix object by specifying each element of the matrix.
Since: 24
Parameters
| Name | Description |
|---|---|
| const float* elements | Pointer to the array of expected matrix element data. The array length must be greater than or equal to 16. If the length is less than 16, undefined behavior may occur. This parameter cannot be a null pointer. If it is a null pointer, the API returns a null value. |
Returns
| Type | Description |
|---|---|
| ArkUI_Matrix4* | Pointer to the fourth-order matrix object created using the specified matrix elements. If the elements pointer is null, NULL is returned. |
void OH_ArkUI_Matrix4_Dispose(ArkUI_Matrix4* matrix)
Description
Disposes of the pointer to the matrix object.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be disposed of. |
ArkUI_Matrix4* OH_ArkUI_Matrix4_Copy(const ArkUI_Matrix4* matrix)
Description
Creates a copy of a fourth-order matrix object. By copying the original matrix, you can perform operations on it independently to obtain different matrix transformation results. When the copy object is no longer used, call OH_ArkUI_Matrix4_Dispose to dispose of it.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4* matrix | Pointer to the original fourth-order matrix object. |
Returns
| Type | Description |
|---|---|
| ArkUI_Matrix4* | Pointer to the copy of the fourth-order matrix object. |
ArkUI_ErrorCode OH_ArkUI_Matrix4_Invert(ArkUI_Matrix4* matrix)
Description
Performs an inverse matrix transformation on the input matrix. The input matrix object will be modified after the transformation.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object for which inverse matrix transformation is to be performed. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs (for example, a null pointer is passed in). |
ArkUI_ErrorCode OH_ArkUI_Matrix4_Combine(ArkUI_Matrix4* oriMatrix, const ArkUI_Matrix4* anotherMatrix)
Description
Combines another matrix with the original matrix and stores the result matrix in oriMatrix. In this case, the result matrix applies the transformation of oriMatrix and then applies the transformation of anotherMatrix. This API will modify the oriMatrix object.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4* oriMatrix | Pointer to the original fourth-order matrix object. |
| const ArkUI_Matrix4* anotherMatrix | Pointer to another matrix object to be combined. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if oriMatrix or anotherMatrix is a null pointer. |
ArkUI_ErrorCode OH_ArkUI_Matrix4_Translate(ArkUI_Matrix4* matrix, const ArkUI_Matrix4TranslationOptions* translate)
Description
Applies translation transformation to the original matrix to obtain the translated matrix. Each translation transformation is accumulated on the previous matrix. The input matrix object will be modified after the transformation.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be translated. |
| const ArkUI_Matrix4TranslationOptions* translate | Pointer to the translation object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if matrix or translate is a null pointer. |
ArkUI_ErrorCode OH_ArkUI_Matrix4_Scale(ArkUI_Matrix4* matrix, const ArkUI_Matrix4ScaleOptions* scale)
Description
Applies scaling transformation to the original matrix to obtain the scaled matrix. Each scaling transformation is accumulated on the previous matrix. This API will modify the input matrix object.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be scaled. |
| const ArkUI_Matrix4ScaleOptions* scale | Pointer to the scaling object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if options is a null pointer. Ensure that a valid scaling parameter object pointer is passed. |
ArkUI_ErrorCode OH_ArkUI_Matrix4_Rotate(ArkUI_Matrix4* matrix, const ArkUI_Matrix4RotationOptions* rotate)
Description
Applies rotation transformation to the original matrix to obtain the rotated matrix. Each rotation transformation is accumulated on the previous matrix. This API will modify the input matrix object.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be rotated. |
| const ArkUI_Matrix4RotationOptions* rotate | Pointer to the rotation object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if matrix or rotate is a null pointer. Ensure that a valid object pointer is passed. |
ArkUI_ErrorCode OH_ArkUI_Matrix4_Skew(ArkUI_Matrix4* matrix, const float skewX, const float skewY)
Description
Applies skew transformation to the original matrix to obtain the skewed matrix. Each skew transformation is accumulated on the previous matrix. The input matrix object will be modified after the transformation.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be skewed. |
| const float skewX | Skew coefficient in the x direction. The value range is (-∞, +∞). The value 0 indicates no skew. A positive value skews the content forward in the x direction, and a negative value skews the content backward in the x direction. |
| const float skewY | Skew coefficient in the y direction. The value range is (-∞, +∞). The value 0 indicates no skew. A positive value skews the content forward in the y direction, and a negative value skews the content backward in the y direction. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4_TransformPoint(const ArkUI_Matrix4* matrix, const ArkUI_PointF* oriPoint, ArkUI_PointF* result)
Description
Calculates the new coordinates of a point after matrix transformation.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object. The value cannot be null. |
| const ArkUI_PointF* oriPoint | Pointer to the original coordinate point. The value cannot be null. |
| ArkUI_PointF* result | Pointer to the result point. The value cannot be null. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4_SetPolyToPoly(ArkUI_Matrix4* matrix, const ArkUI_PointF* src, const ArkUI_PointF* dst, const uint32_t pointCount)
Description
Maps the vertex coordinates of a polygon to those of another polygon and calculates the required matrix.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object, which is used to store the result matrix. |
| const ArkUI_PointF* src | Pointer to the coordinate point array of the original polygon. The array length must be at least the value of pointCount. Otherwise, undefined behavior may occur. |
| const ArkUI_PointF* dst | Pointer to the coordinate point array of the mapped polygon. The array length must be at least the value of pointCount. Otherwise, undefined behavior may occur. |
| const uint32_t pointCount | Number of polygon points. The value must be 0, 1, 2, 3, or 4. If any other value is passed, ARKUI_ERROR_CODE_PARAM_INVALID is returned. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4_GetElements(const ArkUI_Matrix4* matrix, float* result)
Description
Obtains the 16 elements of a fourth-order matrix.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object. |
| float* result | Pointer to the array of 16 floating-point numbers. The value cannot be null. If the buffer capacity is less than 16 floating-point numbers, undefined behavior may occur. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_Matrix4ScaleOptions* OH_ArkUI_Matrix4ScaleOptions_Create()
Description
Creates a pointer to the scaling parameter object for matrix operations. In the newly created object, the default scaling coefficients in the x, y, and z directions are 1. The default values of centerX and centerY of the transformation center point are 0. When the object is no longer used, call OH_ArkUI_Matrix4ScaleOptions_Dispose to dispose of it.
Since: 24
Returns
| Type | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* | Pointer to the newly created ArkUI_Matrix4ScaleOptions object, which is used to set the scaling parameters for matrix operations. |
void OH_ArkUI_Matrix4ScaleOptions_Dispose(ArkUI_Matrix4ScaleOptions* options)
Description
Disposes of the pointer to the scaling parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the ArkUI_Matrix4ScaleOptions object to be disposed of. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetX(ArkUI_Matrix4ScaleOptions* options, const float scaleX)
Description
Sets the scaling factor in the x direction of the scaling parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float scaleX | Scaling factor in the x direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetX(const ArkUI_Matrix4ScaleOptions* options, float* scaleX)
Description
Obtains the scaling factor in the x direction of the scaling parameter object for matrix operations. If the value of x is not set, the default value of the scaling factor in the x direction is 1.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* scaleX | Pointer to the scaling factor in the x direction. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetY(ArkUI_Matrix4ScaleOptions* options, const float scaleY)
Description
Sets the scaling factor in the y direction of the scaling parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float scaleY | Scaling factor in the y direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetY(const ArkUI_Matrix4ScaleOptions* options, float* scaleY)
Description
Obtains the scaling factor in the y direction of the scaling parameter object for matrix operations. If the value of y is not set, the default value of the scaling factor in the y direction is 1.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* scaleY | Pointer to the scaling factor in the y direction. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetZ(ArkUI_Matrix4ScaleOptions* options, const float scaleZ)
Description
Sets the scaling factor in the z direction of the scaling parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float scaleZ | Scaling factor in the z direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetZ(const ArkUI_Matrix4ScaleOptions* options, float* scaleZ)
Description
Obtains the scaling factor in the z direction of the scaling parameter object for matrix operations. If the value of z is not set, the default value of the scaling factor in the z direction is 1.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* scaleZ | Pointer to the scaling factor in the z direction. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetCenterX(ArkUI_Matrix4ScaleOptions* options, const float centerX)
Description
Sets the x coordinate of the transformation center point of the scaling parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float centerX | X-coordinate of the transformation center point. The value range is (-∞, +∞). 0 indicates that there is no x-axis offset based on the transformation center. The unit is px. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetCenterX(const ArkUI_Matrix4ScaleOptions* options, float* centerX)
Description
Obtains the x coordinate of the transformation center point of the scaling parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* centerX | Pointer to the X-coordinate of the transformation center point. The unit is px. The default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetCenterY(ArkUI_Matrix4ScaleOptions* options, const float centerY)
Description
Sets the y coordinate of the transformation center point of the scaling parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float centerY | Y-coordinate of the transformation center point. The value range is (-∞, +∞). 0 indicates that there is no y-axis offset based on the transformation center. The unit is px. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetCenterY(const ArkUI_Matrix4ScaleOptions* options, float* centerY)
Description
Obtains the y coordinate of the transformation center point of the scaling parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* centerY | Pointer to the Y-coordinate of the transformation center point. The unit is px. The default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_Matrix4RotationOptions* OH_ArkUI_Matrix4RotationOptions_Create()
Description
Creates a pointer to the rotation parameter object for matrix operations. In the newly created object, the default value of an x-axis offset (centerX) of a single matrix transformation center point relative to a component transformation center point, the default value of a y-axis offset (centerY) of the single matrix transformation center point relative to the component transformation center point, and the default value of a rotation angle (angle) are 0. If any one of the vectors in the x, y, and z directions is not specified, the rotate effect is equivalent to rotating around the z axis (that is, the direction vectors are x=0, y=0, and z=1 during calculation). Once any of the vectors in the x, y, and z directions is specified, the specified vector takes effect.
Since: 24
Returns
| Type | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* | Pointer to the newly created ArkUI_Matrix4RotationOptions, which is used to set the rotation parameters for matrix operations. |
void OH_ArkUI_Matrix4RotationOptions_Dispose(ArkUI_Matrix4RotationOptions* options)
Description
Disposes of the pointer to the rotation parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetX(ArkUI_Matrix4RotationOptions* options, const float x)
Description
Sets the direction vector in the x direction of the rotation parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float x | Value of the direction vector in the x direction. The value range is (-∞, +∞). It forms the rotation axis together with the vectors in the y and z directions. For example, if x=1, y=0, and z=0, the rotation is around the x axis. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetX(const ArkUI_Matrix4RotationOptions* options, float* x)
Description
Obtains the direction vector in the x direction of the rotation parameter object for matrix operations. If the value of x has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* x | Pointer to the value of the direction vector in the x direction. If the value of x has never been set, the value is undefined. This parameter, together with the y and z direction vectors, forms the rotation axis. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetY(ArkUI_Matrix4RotationOptions* options, const float y)
Description
Sets the direction vector in the y direction of the rotation parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float y | Value of the direction vector in the y direction. The value range is (-∞, +∞). It forms the rotation axis together with the vectors in the x and z directions. For example, if y=1, x=0, and z=0, the rotation is around the y axis. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetY(const ArkUI_Matrix4RotationOptions* options, float* y)
Description
Obtains the direction vector in the y direction of the rotation parameter object for matrix operations. If the value of y has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* y | Pointer to the value of the direction vector in the y direction. If the value of y has never been set, the value is undefined. This parameter, together with the x and z direction vectors, forms the rotation axis. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetZ(ArkUI_Matrix4RotationOptions* options, const float z)
Description
Sets the direction vector in the z direction of the rotation parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float z | Value of the direction vector in the z direction. The value range is (-∞, +∞). It forms the rotation axis together with the vectors in the x and y directions. For example, if z=1, x=0, and y=0, the rotation is around the z axis (default behavior). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetZ(const ArkUI_Matrix4RotationOptions* options, float* z)
Description
Obtains the direction vector in the z direction of the rotation parameter object for matrix operations. If the value of z has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* z | Pointer to the value of the direction vector in the z direction. If the value of z has never been set, the value is undefined. This parameter, together with the x and y direction vectors, forms the rotation axis. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetAngle(ArkUI_Matrix4RotationOptions* options, const float angle)
Description
Sets the rotation angle in the rotation parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float angle | Value of the rotation angle. The value range is (-∞, +∞). The unit is degree. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetAngle(const ArkUI_Matrix4RotationOptions* options, float* angle)
Description
Obtains the rotation angle in the rotation parameter object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* angle | Pointer to the value of the rotation angle. The unit is degree. If the angle has never been set, the default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetCenterX(ArkUI_Matrix4RotationOptions* options, const float centerX)
Description
Sets the x-axis offset of a single matrix transformation center point relative to a component transformation center point.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float centerX | X-axis offset of a single matrix transformation center point relative to a component transformation center point. The value range is (-∞, +∞). 0 indicates that there is no x-axis offset based on the transformation center. The unit is px. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetCenterX(const ArkUI_Matrix4RotationOptions* options, float* centerX)
Description
Obtains the x-axis offset of a single matrix transformation center point relative to a component transformation center point.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* centerX | Pointer to the x-axis offset of a single matrix transformation center point relative to a component transformation center point. The unit is px. If centerX has never been set, the default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetCenterY(ArkUI_Matrix4RotationOptions* options, const float centerY)
Description
Sets the y-axis offset of a single matrix transformation center point relative to a component transformation center point.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float centerY | Y-axis offset of a single matrix transformation center point relative to a component transformation center point. The value range is (-∞, +∞). 0 indicates that there is no y-axis offset based on the transformation center. The unit is px. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Error code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetCenterY(const ArkUI_Matrix4RotationOptions* options, float* centerY)
Description
Obtains the y-axis offset of a single matrix transformation center point relative to a component transformation center point.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* centerY | Pointer to the y-axis offset of a single matrix transformation center point relative to a component transformation center point. The unit is px. If centerY has never been set, the default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_Matrix4TranslationOptions* OH_ArkUI_Matrix4TranslationOptions_Create()
Description
Creates a pointer to a translation object for matrix operations. In the newly created object, the default translation distances on the x, y, and z axes are 0. When the object is no longer used, call OH_ArkUI_Matrix4TranslationOptions_Dispose to dispose of it.
Since: 24
Returns
| Type | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* | Pointer to the newly created ArkUI_Matrix4TranslationOptions object, which is used to set the translation parameters for matrix operations. |
void OH_ArkUI_Matrix4TranslationOptions_Dispose(ArkUI_Matrix4TranslationOptions* options)
Description
Disposes of the pointer to the translation object for matrix operations.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* options | Pointer to the ArkUI_Matrix4TranslationOptions object to be disposed of. |
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetX(ArkUI_Matrix4TranslationOptions* options, const float x)
Description
Sets the translation value of a translation object on the x-axis for matrix operations, in px.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| const float x | Translation value on the x-axis. The value range is (-∞, +∞). The unit is px. If the value of x has never been set, the default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetX(const ArkUI_Matrix4TranslationOptions* options, float* x)
Description
Obtains the translation value of a translation object on the x-axis for matrix operations, in px. If the value of x has never been set, the default value is 0.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| float* x | Pointer to the translation value on the x-axis. The unit is px. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetY(ArkUI_Matrix4TranslationOptions* options, const float y)
Description
Sets the translation value of a translation object on the y-axis for matrix operations, in px.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| const float y | Translation value on the y-axis. The value range is (-∞, +∞). The unit is px. If the value of y has never been set, the default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetY(const ArkUI_Matrix4TranslationOptions* options, float* y)
Description
Obtains the translation value of a translation object on the y-axis for matrix operations, in px. If the value of y has never been set, the default value is 0.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| float* y | Pointer to the translation value on the y-axis. The unit is px. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetZ(ArkUI_Matrix4TranslationOptions* options, const float z)
Description
Sets the translation value of a translation object on the z-axis for matrix operations, in px.
Since: 24
Parameters
| Name | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| const float z | Translation value on the z-axis. The value range is (-∞, +∞). The unit is px. If the value of z has never been set, the default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetZ(const ArkUI_Matrix4TranslationOptions* options, float* z)
Description
Obtains the translation value of a translation object on the z-axis for matrix operations, in px. If the value of z has never been set, the default value is 0.
Since: 24
Parameters
| Name | Description |
|---|---|
| const ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| float* z | Pointer to the translation value on the z-axis. The unit is px. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_MotionPathOptions* OH_ArkUI_MotionPathOptions_Create()
Description
Creates motion path options for a path animation. When the object is no longer used, call OH_ArkUI_MotionPathOptions_Dispose to dispose of it.
Since: 23
Returns
| Type | Description |
|---|---|
| ArkUI_MotionPathOptions* | Pointer to ArkUI_MotionPathOptions. In the newly created ArkUI_MotionPathOptions object, path (motion path) is an empty string, from (start progress) is 0, to (end progress) is 1, and rotatable (whether the component rotates along the path) is false. |
void OH_ArkUI_MotionPathOptions_Dispose(ArkUI_MotionPathOptions* options)
Description
Disposes of a motion path option of path animation.
Since: 23
Parameters
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetPath(ArkUI_MotionPathOptions* options, const char* svgPath)
Description
Sets the motion path of path animation.
Since: 23
Parameters
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| const char* svgPath | Pointer to the motion path string of path animation. The path supports "start" and "end" as placeholders for the start and end points, for example, "Mstart.x start.y L50 50 Lend.x end.y Z". For details about the path string format, see Path Drawing. Setting this to an empty string is equivalent to not setting a motion path. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if options or svgPath is a null pointer. Ensure that valid motion path configuration options and a path string are passed in. |
ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetPath(const ArkUI_MotionPathOptions* options, char* svgPathBuffer, const int32_t bufferSize, int32_t* writeLength)
Description
Obtains the motion path string stored in the motion path configuration item of the path animation.
Since: 23
Parameters
| Name | Description |
|---|---|
| const ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| char* svgPathBuffer | Pointer to the buffer for storing the motion path string. The pointer cannot be null. The buffer size must be sufficient to accommodate the path string. |
| const int32_t bufferSize | Size of the buffer specified by the svgPathBuffer parameter. The value must be greater than 0. If 0 or a negative number is passed, ARKUI_ERROR_CODE_PARAM_INVALID is returned. |
| int32_t* writeLength | Pointer to the length of the string (including the terminator) actually written to the buffer if ARKUI_ERROR_CODE_NO_ERROR is returned. When ARKUI_ERROR_CODE_PARAM_INVALID is returned due to an input parameter error, writeLength is not assigned. If the error is due to a copy exception, writeLength indicates the minimum buffer size required to hold the target string. When ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR is returned, it indicates the minimum buffer size required to hold the target string. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter exception occurs. Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the buffer size is insufficient. |
ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetFrom(ArkUI_MotionPathOptions* options, const float from)
Description
Sets the start progress of the path animation. The progress refers to the ratio of the distance already moved along the path to the total path length.
Since: 23
Parameters
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| const float from | Start progress of the path animation, ranging from 0.0 to 1.0. This value must be less than or equal to the end progress specified by to. Otherwise, the error ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE will be returned. For details about to, see OH_ArkUI_MotionPathOptions_SetTo. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a function parameter error occurs. Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the value of from is not within the range of [0.0, 1.0], or the value of from is greater than that of to. Ensure that the value of from is within the range of [0.0, 1.0] and is not greater than that of to. |
ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetFrom(const ArkUI_MotionPathOptions* options, float* from)
Description
Obtains the start progress of the path animation.
Since: 23
Parameters
| Name | Description |
|---|---|
| const ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| float* from | Pointer to the start progress in ArkUI_MotionPathOptions. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetTo(ArkUI_MotionPathOptions* options, const float to)
Description
Sets the end progress of the path animation. The progress refers to the ratio of the distance already moved along the path to the total path length.
Since: 23
Parameters
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| const float to | End progress of the path animation, ranging from 0.0 to 1.0. This value must be greater than or equal to the start progress specified by from. Otherwise, the error ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE will be returned. For details about from, see OH_ArkUI_MotionPathOptions_SetFrom. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a function parameter error occurs. Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the value of to is out of the range of [0.0, 1.0], or is less than the value of from. |
ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetTo(const ArkUI_MotionPathOptions* options, float* to)
Description
Obtains the end progress of the path animation.
Since: 23
Parameters
| Name | Description |
|---|---|
| const ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| float* to | Pointer to the end progress in ArkUI_MotionPathOptions. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetRotatable(ArkUI_MotionPathOptions* options, const bool rotatable)
Description
Sets whether a component rotates along the motion path.
Since: 23
Parameters
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| const bool rotatable | Whether the component rotates along the path. true: The component rotates along the path. false: The component does not rotate along the path. The default value is false. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetRotatable(const ArkUI_MotionPathOptions* options, bool* rotatable)
Description
Obtains whether a component rotates along the motion path.
Since: 23
Parameters
| Name | Description |
|---|---|
| const ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| bool* rotatable | Pointer to the rotatable parameter value in ArkUI_MotionPathOptions, indicating whether the component rotates along the path. true: The component rotates along the path. false: The component does not rotate along the path. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
OH_ArkUI_ShadowOptions* OH_ArkUI_ShadowOptions_Create()
Description
Creates a shadow option object. In the newly created object, the default value of the blur radius (radius) is 0, the default value of the shadow offset on the x-axis (offsetX) is 0, the default value of the shadow offset on the y-axis (offsetY) is 0, the default value of the shadow color (color) is 0xFF000000, the default value of the shadow type (type) is ARKUI_SHADOW_TYPE_COLOR, and the default value of whether to fill the component with shadow (isFill) is false. If the object is no longer used, call OH_ArkUI_ShadowOptions_Destroy to destroy it.
Since: 24
Returns
| Type | Description |
|---|---|
| OH_ArkUI_ShadowOptions* | Pointer to the newly created OH_ArkUI_ShadowOptions object, which is used to set the blur radius, type, color, and offset of the shadow. |
void OH_ArkUI_ShadowOptions_Destroy(OH_ArkUI_ShadowOptions* options)
Description
Destroys the shadow option object.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the newly created OH_ArkUI_ShadowOptions object, which is used to set the blur radius, type, color, and offset of the shadow. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetRadius(OH_ArkUI_ShadowOptions* options, float radius)
Description
Sets the blur radius for the shadow options.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float radius | Blur radius of the shadow, in vp. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if options is a null pointer. Ensure that a valid shadow option object pointer is passed. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetRadius(OH_ArkUI_ShadowOptions* options, float* radius)
Description
Obtains the blur radius of the shadow options.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float* radius | Pointer to the blur radius of the shadow, in px. The value 0 indicates no blur effect is applied. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetType(OH_ArkUI_ShadowOptions* options, ArkUI_ShadowType type)
Description
Sets the shadow type for the shadow options.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| ArkUI_ShadowType type | Shadow type (ArkUI_ShadowType). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetType(OH_ArkUI_ShadowOptions* options, ArkUI_ShadowType* type)
Description
Obtains the shadow type of the shadow options.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| ArkUI_ShadowType* type | Pointer to the shadow type (ArkUI_ShadowType). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetColor(OH_ArkUI_ShadowOptions* options, uint32_t color)
Description
Sets the shadow color for the shadow options.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| uint32_t color | Shadow color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetColor(OH_ArkUI_ShadowOptions* options, uint32_t* color)
Description
Obtains the shadow color of the shadow options.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| uint32_t* color | Pointer to the shadow color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetOffsetX(OH_ArkUI_ShadowOptions* options, float offsetX)
Description
Sets the shadow offset on the x-axis.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float offsetX | Shadow offset on the x-axis, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetOffsetX(OH_ArkUI_ShadowOptions* options, float* offsetX)
Description
Obtains the shadow offset on the x-axis.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float* offsetX | Pointer to the shadow offset on the x-axis, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetOffsetY(OH_ArkUI_ShadowOptions* options, float offsetY)
Description
Sets the shadow offset on the y-axis.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float offsetY | Shadow offset on the y-axis, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetOffsetY(OH_ArkUI_ShadowOptions* options, float* offsetY)
Description
Obtains the shadow offset on the y-axis.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float* offsetY | Pointer to the shadow offset on the y-axis, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetFill(OH_ArkUI_ShadowOptions* options, bool isFill)
Description
Sets whether to fill a component with a shadow.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| bool isFill | Whether to fill a component with a shadow. true means to fill a component with a shadow, and false means the opposite. The default value is false. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetFill(OH_ArkUI_ShadowOptions* options, bool* isFill)
Description
Obtains whether a component is filled with a shadow.
Since: 24
Parameters
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| bool* isFill | Pointer to the isFill parameter indicating whether a component is filled with a shadow. true means a component is filled with a shadow, and false means the opposite. The default value is false. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result code. Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful. Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs. |