diff options
author | Cary Clark <caryclark@skia.org> | 2017-11-02 17:49:34 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-02 22:10:53 +0000 |
commit | 2ade99783120cf9149e7b2e85b3c3c2bd63d4839 (patch) | |
tree | 62498c450e03777d3e8f6a2e3aed31eb0b4c3020 /docs/SkMatrix_Reference.bmh | |
parent | ba7cf29fa8cb60514177bcf7c91f5f1607480ad6 (diff) |
filling holes in canvas doc
filling holes in canvas doc
Docs-Preview: https://skia.org/?cl=66920
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I3a211df5f19ecfbfa0bb060bb6d55005a38cd360
Reviewed-on: https://skia-review.googlesource.com/66920
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'docs/SkMatrix_Reference.bmh')
-rw-r--r-- | docs/SkMatrix_Reference.bmh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/SkMatrix_Reference.bmh b/docs/SkMatrix_Reference.bmh index 54d21c8fff..107457c5a6 100644 --- a/docs/SkMatrix_Reference.bmh +++ b/docs/SkMatrix_Reference.bmh @@ -1372,6 +1372,7 @@ Sets all values from parameters. Sets matrix to: #Param persp2 perspective scale factor to store ## #Example +#Height 128 SkPaint p; p.setAntiAlias(true); p.setTextSize(64); @@ -1379,7 +1380,7 @@ Sets all values from parameters. Sets matrix to: for (SkScalar sx : { -1, 1 } ) { for (SkScalar sy : { -1, 1 } ) { SkAutoCanvasRestore autoRestore(canvas, true); - m.setAll(sx, 1, 128, 0, sy, 128, 0, 0, 1); + m.setAll(sx, 1, 128, 0, sy, 64, 0, 0, 1); canvas->concat(m); canvas->drawString("K", 0, 0, p); } @@ -1574,6 +1575,7 @@ The pivot point is unchanged when mapped with Matrix. #Param py pivot y ## #Example +#Height 128 SkPaint p; p.setAntiAlias(true); p.setTextSize(64); @@ -1581,9 +1583,9 @@ The pivot point is unchanged when mapped with Matrix. for (SkScalar sx : { -1, 1 } ) { for (SkScalar sy : { -1, 1 } ) { SkAutoCanvasRestore autoRestore(canvas, true); - m.setScale(sx, sy, 128, 128); + m.setScale(sx, sy, 128, 64); canvas->concat(m); - canvas->drawString("K", 128, 128, p); + canvas->drawString("%", 128, 64, p); } } ## @@ -1602,6 +1604,7 @@ Sets Matrix to scale by sx and sy about at pivot point at (0, 0). #Param sy vertical scale factor ## #Example +#Height 128 SkPaint p; p.setAntiAlias(true); p.setTextSize(64); @@ -1610,9 +1613,9 @@ Sets Matrix to scale by sx and sy about at pivot point at (0, 0). for (SkScalar sy : { -1, 1 } ) { SkAutoCanvasRestore autoRestore(canvas, true); m.setScale(sx, sy); - m.postTranslate(128, 128); + m.postTranslate(128, 64); canvas->concat(m); - canvas->drawString("K", 0, 0, p); + canvas->drawString("@", 0, 0, p); } } ## @@ -3827,6 +3830,7 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- #Param rect Rect to map ## #Example +#Height 192 SkPaint paint; paint.setAntiAlias(true); SkMatrix matrix; |