pub unsafe extern "C" fn OH_Drawing_MatrixPreScale(
matrix: *mut OH_Drawing_Matrix,
sx: f32,
sy: f32,
px: f32,
py: f32,
)Expand description
@brief Sets matrix to forward scale by sx and sy, about a pivot point at (px, py). Given:
| A B C | | sx 0 dx |
Matrix =| D E F |, S(sx, sy, px, py) = | 0 sy dy |
| G H I | | 0 0 1 |
where:
dx = px - sx * px
dy = py - sy * py
sets Matrix to:
| A B C | | sx 0 dx | | A*sx B*sy A*dx+B*dy+C |
Matrix * S(sx, sy, px, py) = | D E F | | 0 sy dy | = | D*sx E*sy D*dx+E*dy+F |
| G H I | | 0 0 1 | | G*sx H*sy G*dx+H*dy+I |@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing @param matrix Indicates the pointer to an OH_Drawing_Matrix object. @param sx Horizontal scale factor. @param sy Vertical scale factor. @param px Pivot on x-axis. @param py Pivot on y-axis. @since 12 @version 1.0