pub unsafe extern "C" fn OH_Drawing_CanvasReadPixelsToBitmap(
canvas: *mut OH_Drawing_Canvas,
bitmap: *mut OH_Drawing_Bitmap,
srcX: i32,
srcY: i32,
) -> boolExpand description
@brief Copies pixel data from a canvas to an image. This function cannot be used for a canvas of the recording type. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
@param canvas Pointer to the {@link OH_Drawing_Canvas} object. @param bitmap Pointer to the {@link OH_Drawing_Bitmap} object. @param srcX X offset of the pixels on the canvas, in px. @param srcY Y offset of the pixels on the canvas, in px. @return Returns true if the pixel data is copied to the image; returns false otherwise. @since 12 @version 1.0