Skip to main content

OH_Drawing_MatrixScale

Function OH_Drawing_MatrixScale 

Source
pub unsafe extern "C" fn OH_Drawing_MatrixScale(
    matrix: *mut OH_Drawing_Matrix,
    sx: f32,
    sy: f32,
    px: f32,
    py: f32,
)
Expand description

@brief Sets a matrix as an identity matrix and scales it with the factor (sx, sy) at the rotation point (px, py). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.

@param matrix Pointer to the {@link OH_Drawing_Matrix} object. @param sx Scale factor on the X axis. If a negative number is passed in, the matrix is mirrored around y = px before being scaled. The value is a floating point number. @param sy Scale factor on the Y axis. If a negative number is passed in, the matrix is mirrored around x = py before being scaled. The value is a floating point number. @param px Coordinate point on the X axis. @param py Coordinate point on the Y axis. @since 12 @version 1.0