pub unsafe extern "C" fn OH_ArkUI_RenderNodeUtils_SetTransform(
node: ArkUI_RenderNodeHandle,
matrix: *mut f32,
) -> i32api-20 only.Expand description
Set the transformation matrix for a RenderNode.
§Arguments
-
node- Handle to the target render node. -
matrix- Pointer to a 4x4 transformation matrix (16 consecutive values). The transformation matrix should be provided as 16 consecutive floating-point values in row-major order: [m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33] Where the matrix represents: | m00 m01 m02 m03 | | m10 m11 m12 m13 | | m20 m21 m22 m23 | | m30 m31 m32 m33 | Matrix components: | m00 | Scaling value of the x-axis. The default value is 1 for the identity matrix. | | m01 | The second value, which is affected by the rotation or tilt of the x, y, and z axes. | | m02 | The third value, which is affected by the rotation of the x, y, and z axes. | | m03 | The fourth value, which is affected by perspective projection. | | m10 | The fifth value, which is affected by the rotation or tilt of the x, y, and z axes. | | m11 | Scaling value of the y-axis. The default value is 1 for the identity matrix. | | m12 | The seventh value, which is affected by the rotation of the x, y, and z axes. | | m13 | The eighth value, which is affected by perspective projection. | | m20 | The ninth value, which is affected by the rotation of the x, y, and z axes. | | m21 | The tenth value, which is affected by the rotation of the x, y, and z axes. | | m22 | Scaling value of the z-axis. The default value is 1 for the identity matrix. | | m23 | The 12th value, which is affected by perspective projection. | | m30 | Translation value of the x-axis, in px. The default value is 0 for the identity matrix.| | m31 | Translation value of the y-axis, in px. The default value is 0 for the identity matrix.| | m32 | Translation value of the z-axis, in px. The default value is 0 for the identity matrix.| | m33 | Valid in homogeneous coordinates, presenting the perspective projection effect. |
§Returns
- Error code.
[
ARKUI_ERROR_CODE_NO_ERROR] Success. [ARKUI_ERROR_CODE_PARAM_INVALID] Function parameter exception. [ARKUI_ERROR_CODE_CAPI_INIT_ERROR] if CAPI init error. [ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE] Parameter out of range.
Available since API-level: 20