Skip to main content

OH_PixelmapNative_Translate

Function OH_PixelmapNative_Translate 

Source
pub unsafe extern "C" fn OH_PixelmapNative_Translate(
    pixelmap: *mut OH_PixelmapNative,
    x: f32,
    y: f32,
) -> Image_ErrorCode
Expand description

@brief Translates this image based on the input coordinates. It is recommended to use {@link OH_PixelmapNative_ApplyTranslate}.

@param pixelmap The Pixelmap pointer will be operated. @param x The distance to be translate in the X direction. @param y The distance to be translate in the Y direction. @return Function result code: {@link IMAGE_SUCCESS} - The operation is successful. {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes: 1.pixelmap is nullptr. 2.pixelmap’s inner pixelmap is nullptr. @since 12