Skip to main content

OH_Drawing_MatrixSetRectToRect

Function OH_Drawing_MatrixSetRectToRect 

Source
pub unsafe extern "C" fn OH_Drawing_MatrixSetRectToRect(
    matrix: *mut OH_Drawing_Matrix,
    src: *const OH_Drawing_Rect,
    dst: *const OH_Drawing_Rect,
    stf: OH_Drawing_ScaleToFit,
) -> bool
Expand description

@brief Scales a matrix to map a source rectangle to a destination rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of matrix, src, and dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.

@param matrix Pointer to the {@link OH_Drawing_Matrix} object. @param src Pointer to the {@link OH_Drawing_Rect} object of the mapping source. @param dst Pointer to the {@link OH_Drawing_Rect} object of the mapping destination. @param stf Scaling mode. For details about the available options, see {@link OH_Drawing_ScaleToFit}. @return Returns true if dst is empty, and sets matrix to: | 0 0 0 | | 0 0 0 | | 0 0 1 |

@since 12 @version 1.0