postRotate method

void postRotate(
  1. double degrees, {
  2. double px = 0,
  3. double py = 0,
})

Sets Matrix to Matrix constructed from rotating by degrees about pivot point (px, py), multiplied by Matrix. This can be thought of as rotating about a pivot point after applying Matrix.

Positive degrees rotates clockwise.

Given:

         | J K L |                        | c -s dx |
Matrix = | M N O |,  R(degrees, px, py) = | s  c dy |
         | P Q R |                        | 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:

                              |c -s dx| |J K L|   |cJ-sM+dx*P cK-sN+dx*Q cL-sO+dx+R|
R(degrees, px, py) * Matrix = |s  c dy| |M N O| = |sJ+cM+dy*P sK+cN+dy*Q sL+cO+dy*R|
                              |0  0  1| |P Q R|   |         P          Q          R|

@param degrees angle of axes relative to upright axes @param px pivot x @param py pivot y

Implementation

void postRotate(double degrees, {double px = 0, double py = 0}) =>
    c.mnn_cv_matrix_post_rotate(ptr, degrees, px, py);