diff options
Diffstat (limited to 'site/user/api/SkMatrix_Reference.md')
-rw-r--r-- | site/user/api/SkMatrix_Reference.md | 96 |
1 files changed, 95 insertions, 1 deletions
diff --git a/site/user/api/SkMatrix_Reference.md b/site/user/api/SkMatrix_Reference.md index 4c891add50..617ccc8915 100644 --- a/site/user/api/SkMatrix_Reference.md +++ b/site/user/api/SkMatrix_Reference.md @@ -680,6 +680,8 @@ Sets <a href='#Matrix'>Matrix</a> to scale by (<a href='#SkMatrix_MakeScale_sx'> | 0 0 1 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_MakeScale_sx'><code><strong>sx</strong></code></a></td> @@ -718,6 +720,8 @@ Sets <a href='#Matrix'>Matrix</a> to <a href='#SkMatrix_MakeScale_2_scale'>scale | 0 0 1 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_MakeScale_2_scale'><code><strong>scale</strong></code></a></td> @@ -754,6 +758,8 @@ Sets <a href='#Matrix'>Matrix</a> to translate by (<a href='#SkMatrix_MakeTrans_ | 0 0 1 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_MakeTrans_dx'><code><strong>dx</strong></code></a></td> @@ -795,6 +801,8 @@ Sets <a href='#Matrix'>Matrix</a> to: | pers0 pers1 pers2 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_MakeAll_scaleX'><code><strong>scaleX</strong></code></a></td> @@ -1076,6 +1084,8 @@ Returns true if <a href='#Matrix'>Matrix</a> is identity. Identity matrix is: | 0 0 1 | </pre> +. + ### Return Value true if <a href='#Matrix'>Matrix</a> has no effect @@ -1115,6 +1125,8 @@ contain only scale elements, only translate elements, or both. <a href='#Matrix' | 0 0 1 | </pre> +. + ### Return Value true if <a href='#Matrix'>Matrix</a> is identity; or scales, translates, or both @@ -1155,6 +1167,8 @@ Returns true if <a href='#Matrix'>Matrix</a> is identity, or translates. <a href | 0 0 1 | </pre> +. + ### Return Value true if <a href='#Matrix'>Matrix</a> is identity, or translates @@ -2472,6 +2486,8 @@ Sets all values from parameters. Sets matrix to: | persp0 persp1 persp2 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_setAll_scaleX'><code><strong>scaleX</strong></code></a></td> @@ -2570,6 +2586,8 @@ Sets matrix to: | buffer[6] buffer[7] buffer[8] | </pre> +. + In the future, <a href='#SkMatrix_set9'>set9</a> followed by <a href='#SkMatrix_get9'>get9</a> may not return the same values. Since <a href='#Matrix'>Matrix</a> maps non-homogeneous coordinates, scaling all nine values produces an equivalent transformation, possibly improving precision. @@ -2606,6 +2624,8 @@ Sets <a href='#Matrix'>Matrix</a> to identity; which has no effect on mapped <a | 0 0 1 | </pre> +. + Also called <a href='#SkMatrix_setIdentity'>setIdentity</a>; use the one that provides better inline documentation. @@ -2642,6 +2662,8 @@ Sets <a href='#Matrix'>Matrix</a> to identity; which has no effect on mapped <a | 0 0 1 | </pre> +. + Also called <a href='#SkMatrix_reset'>reset</a>; use the one that provides better inline documentation. @@ -3037,6 +3059,8 @@ a * b = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR | | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_setConcat_a'><code><strong>a</strong></code></a></td> @@ -3085,6 +3109,8 @@ Matrix * T(dx, dy) = | D E F | | 0 1 dy | = | D E D*dx+E*dy+F | | G H I | | 0 0 1 | | G H G*dx+H*dy+I | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_preTranslate_dx'><code><strong>dx</strong></code></a></td> @@ -3139,6 +3165,8 @@ 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 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_preScale_sx'><code><strong>sx</strong></code></a></td> @@ -3191,6 +3219,8 @@ Matrix * S(sx, sy) = | D E F | | 0 sy 0 | = | D*sx E*sy F | | G H I | | 0 0 1 | | G*sx H*sy I | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_preScale_2_sx'><code><strong>sx</strong></code></a></td> @@ -3249,6 +3279,8 @@ 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 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_preRotate_degrees'><code><strong>degrees</strong></code></a></td> @@ -3307,6 +3339,8 @@ Matrix * R(degrees, px, py) = | D E F | | s c 0 | = | Dc+Es -Ds+Ec F | | G H I | | 0 0 1 | | Gc+Hs -Gs+Hc I | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_preRotate_2_degrees'><code><strong>degrees</strong></code></a></td> @@ -3358,6 +3392,8 @@ Matrix * K(kx, ky, px, py) = | D E F | | ky 1 dy | = | D+E*ky D*kx+E D*dx+E*dy+ | G H I | | 0 0 1 | | G+H*ky G*kx+H G*dx+H*dy+I | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_preSkew_kx'><code><strong>kx</strong></code></a></td> @@ -3410,6 +3446,8 @@ Matrix * K(kx, ky) = | D E F | | ky 1 0 | = | D+E*ky D*kx+E F | | G H I | | 0 0 1 | | G+H*ky G*kx+H I | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_preSkew_2_kx'><code><strong>kx</strong></code></a></td> @@ -3456,6 +3494,8 @@ Matrix * other = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR | | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_preConcat_other'><code><strong>other</strong></code></a></td> @@ -3501,6 +3541,8 @@ T(dx, dy) * Matrix = | 0 1 dy | | M N O | = | M+dy*P N+dy*Q O+dy*R | | 0 0 1 | | P Q R | | P Q R | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postTranslate_dx'><code><strong>dx</strong></code></a></td> @@ -3556,6 +3598,8 @@ S(sx, sy, px, py) * Matrix = | 0 sy dy | | M N O | = | sy*M+dy*P sy*N+dy*Q sy*O | 0 0 1 | | P Q R | | P Q R | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postScale_sx'><code><strong>sx</strong></code></a></td> @@ -3608,6 +3652,8 @@ S(sx, sy) * Matrix = | 0 sy 0 | | M N O | = | sy*M sy*N sy*O | | 0 0 1 | | P Q R | | P Q R | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postScale_2_sx'><code><strong>sx</strong></code></a></td> @@ -3663,6 +3709,8 @@ I(divx, divy) * Matrix = | 0 sy 0 | | M N O | = | sy*M sy*N sy*O | | 0 0 1 | | P Q R | | P Q R | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postIDiv_divx'><code><strong>divx</strong></code></a></td> @@ -3725,6 +3773,8 @@ R(degrees, px, py) * Matrix = |s c dy| |M N O| = |sJ+cM+dy*P sK+cN+dy*Q sL+cO+d |0 0 1| |P Q R| | P Q R| </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postRotate_degrees'><code><strong>degrees</strong></code></a></td> @@ -3783,6 +3833,8 @@ R(degrees, px, py) * Matrix = | s c dy | | M N O | = | sJ+cM sK+cN sL+cO | | 0 0 1 | | P Q R | | P Q R | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postRotate_2_degrees'><code><strong>degrees</strong></code></a></td> @@ -3834,6 +3886,8 @@ K(kx, ky, px, py) * Matrix = |ky 1 dy| |M N O| = |ky*J+M+dy*P ky*K+N+dy*Q ky*L+ | 0 0 1| |P Q R| | P Q R| </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postSkew_kx'><code><strong>kx</strong></code></a></td> @@ -3886,6 +3940,8 @@ K(kx, ky) * Matrix = | ky 1 0 | | M N O | = | ky*J+M ky*K+N ky*L+O | | 0 0 1 | | P Q R | | P Q R | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postSkew_2_kx'><code><strong>kx</strong></code></a></td> @@ -3932,6 +3988,8 @@ other * Matrix = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR | | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_postConcat_other'><code><strong>other</strong></code></a></td> @@ -4035,6 +4093,8 @@ Returns true if <a href='#SkMatrix_setRectToRect_dst'>dst</a> is empty, and sets | 0 0 1 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_setRectToRect_src'><code><strong>src</strong></code></a></td> @@ -4096,6 +4156,8 @@ empty, returns <a href='#Matrix'>Matrix</a> set to: | 0 0 1 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_MakeRectToRect_src'><code><strong>src</strong></code></a></td> @@ -4229,6 +4291,8 @@ Sets <a href='#SkMatrix_SetAffineIdentity_affine'>affine</a> to: | 0 1 0 | </pre> +. + Affine 3x2 matrices in column major order are used by OpenGL and XPS. ### Parameters @@ -4270,6 +4334,8 @@ Fills <a href='#SkMatrix_asAffine_affine'>affine</a> in column major order. Sets | skew-y scale-y translate-y | </pre> +. + If <a href='#Matrix'>Matrix</a> contains perspective, returns false and leaves <a href='#SkMatrix_asAffine_affine'>affine</a> unchanged. ### Parameters @@ -4324,6 +4390,8 @@ column, then row, as: | 0 0 1 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_setAffine_affine'><code><strong>affine</strong></code></a></td> @@ -4471,6 +4539,8 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I </pre> +. + <a href='#SkMatrix_mapPoints_src'>src</a> and <a href='#SkMatrix_mapPoints_dst'>dst</a> may point to the same storage. ### Parameters @@ -4528,6 +4598,8 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_mapPoints_2_pts'><code><strong>pts</strong></code></a></td> @@ -4572,6 +4644,8 @@ Matrix * src = |D E F| |y| = |Ax+By+Cz Dx+Ey+Fz Gx+Hy+Iz| |G H I| |z| </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_mapHomogeneousPoints_dst'><code><strong>dst</strong></code></a></td> @@ -4618,6 +4692,8 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_mapXY_x'><code><strong>x</strong></code></a></td> @@ -4663,6 +4739,8 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_mapXY_2_x'><code><strong>x</strong></code></a></td> @@ -4778,6 +4856,8 @@ Matrix * vec = |D E 0| |y| = |Ax+By Dx+Ey Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_mapVectors_2_vecs'><code><strong>vecs</strong></code></a></td> @@ -4822,6 +4902,8 @@ Matrix * vec = |D E 0| |dy| = |A*dx+B*dy D*dx+E*dy G*dx+H*dy+I| = ----------- , |G H I| | 1| G*dx+H*dy+I G*dx+*dHy+I </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_mapVector_dx'><code><strong>dx</strong></code></a></td> @@ -4868,6 +4950,8 @@ Matrix * vec = |D E 0| |dy| = |A*dx+B*dy D*dx+E*dy G*dx+H*dy+I| = ----------- , |G H I| | 1| G*dx+H*dy+I G*dx+*dHy+I </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_mapVector_2_dx'><code><strong>dx</strong></code></a></td> @@ -5022,6 +5106,8 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_mapRectToQuad_dst'><code><strong>dst</strong></code></a></td> @@ -5491,7 +5577,7 @@ Returns true if <a href='#SkMatrix_decomposeScale_scale'>scale</a> components ar unchanged if <a href='#Matrix'>Matrix</a> contains perspective; <a href='#SkMatrix_decomposeScale_scale'>scale</a> factors are not finite, or are nearly zero. -On success<a href='#Matrix'>Matrix</a> = <a href='#SkMatrix_decomposeScale_scale'>scale</a> * Remaining +On success<a href='#Matrix'>Matrix</a> = <a href='#SkMatrix_decomposeScale_scale'>scale</a> * Remaining. ### Parameters @@ -5543,6 +5629,8 @@ Returns reference to const identity <a href='#Matrix'>Matrix</a>. Returned <a hr | 0 0 1 | </pre> +. + ### Return Value const identity <a href='#Matrix'>Matrix</a> @@ -5582,6 +5670,8 @@ to: | SK_ScalarMax SK_ScalarMax SK_ScalarMax | </pre> +. + ### Return Value const invalid <a href='#Matrix'>Matrix</a> @@ -5629,6 +5719,8 @@ a * b = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR | | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_Concat_a'><code><strong>a</strong></code></a></td> @@ -5701,6 +5793,8 @@ Initializes <a href='#Matrix'>Matrix</a> with scale and translate elements. | 0 0 1 | </pre> +. + ### Parameters <table> <tr> <td><a name='SkMatrix_setScaleTranslate_sx'><code><strong>sx</strong></code></a></td> |