pub unsafe extern "C" fn OH_Drawing_MatrixPreRotate(
matrix: *mut OH_Drawing_Matrix,
degree: f32,
px: f32,
py: f32,
)Expand description
@brief Sets matrix to matrix multiplied by matrix constructed from rotating by degrees about pivot point(px, py), positive degrees rotates clockwise. Given:
| A B C | | c -s dx |
Matrix = | D E F |, R(degrees, px, py) = | s c dy |
| G H I | | 0 0 1 |
where:
c = cos(degrees)
s = sin(degrees)
dx = s * py + (1 - c) * px
dy = -s * px + (1 - c) * py
sets Matrix to:
| A B C | | c -s dx | | Ac+Bs -As+Bc A*dx+B*dy+C |
Matrix * R(degrees, px, py) = | D E F | | s c dy | = | Dc+Es -Ds+Ec D*dx+E*dy+F |
| G H I | | 0 0 1 | | Gc+Hs -Gs+Hc G*dx+H*dy+I |@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing @param matrix Indicates the pointer to an OH_Drawing_Matrix object. @param degree Indicates the angle of axes relative to upright axes. @param px Indicates the pivot on x-axis. @param py Indicates the pivot on y-axis. @since 12 @version 1.0