Skip to main content

OH_Drawing_CanvasDrawBitmapRect

Function OH_Drawing_CanvasDrawBitmapRect 

Source
pub unsafe extern "C" fn OH_Drawing_CanvasDrawBitmapRect(
    canvas: *mut OH_Drawing_Canvas,
    bitmap: *const OH_Drawing_Bitmap,
    src: *const OH_Drawing_Rect,
    dst: *const OH_Drawing_Rect,
    samplingOptions: *const OH_Drawing_SamplingOptions,
)
Expand description

@brief Draws a portion of a bitmap onto a specified area of the canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If one of canvas, bitmap, or dst 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 src Pointer to a rectangle on the bitmap. If NULL is passed in, it refers to the entire bitmap. @param dst Pointer to a rectangle on the canvas. @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object. A null pointer means that the default sampling options are used. @since 12 @version 1.0