Skip to main content

OH_PixelmapNative_Opacity

Function OH_PixelmapNative_Opacity 

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

@brief Sets an opacity rate for this image pixel map. It is recommended to use {@link OH_PixelmapNative_SetOpacity}.

@param pixelmap The Pixelmap pointer will be operated. @param rate Opacity rate to set. The value ranges from 0 to 1. @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