OH_NativeImage_GetBufferMatrix

Function OH_NativeImage_GetBufferMatrix 

Source
pub unsafe extern "C" fn OH_NativeImage_GetBufferMatrix(
    image: *mut OH_NativeImage,
    matrix: *mut f32,
) -> i32
Available on crate features native_image and api-15 only.
Expand description

Obtains the transform matrix that combines with crop rect.

This API returns a transform matrix that combines the crop rect. Note that the matrix will not be updated until OH_NativeImage_UpdateSurfaceImage is called.

This interface is a non-thread-safe type interface.

Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeImage

§Arguments

  • image - Indicates the pointer to a OH_NativeImage instance.

  • matrix - Indicates the retrieved 4*4 transform matrix .

§Returns

  • [NATIVE_ERROR_OK] 0 - Success. [NATIVE_ERROR_INVALID_ARGUMENTS] 40001000 - image is NULL. [NATIVE_ERROR_MEM_OPERATION_ERROR] 30001000 - Memory operation error, failed to get transform matrix.

Available since API-level: 15

Version: 1.0