Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: site/user/api/skcanvas.md

Issue 1228063002: doc: more changes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-07-09 (Thursday) 09:56:30 EDT Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | site/user/tips.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site/user/api/skcanvas.md
diff --git a/site/user/api/skcanvas.md b/site/user/api/skcanvas.md
index 98d7f7fbcc03307de806425d4b5bb4620e221017..57508149631b62b547f11b8dc17605e5dc664bbd 100644
--- a/site/user/api/skcanvas.md
+++ b/site/user/api/skcanvas.md
@@ -50,15 +50,17 @@ SkPaint.
void draw(SkCanvas* canvas) {
canvas->save();
+ canvas->translate(SkIntToScalar(128), SkIntToScalar(128));
canvas->rotate(SkIntToScalar(45));
- SkRect rect = SkRect::MakeXYWH(150, -50, 100, 100);
+ SkRect rect = SkRect::MakeXYWH(-90.5f, -90.5f, 181.0f, 181.0f);
SkPaint paint;
+ paint.setColor(SK_ColorBLUE);
canvas->drawRect(rect, paint);
canvas->restore();
}
-<a href="https://fiddle.skia.org/c/71f2e87df2be1cdbc44139ee3e2790eb">
-<img src="https://fiddle.skia.org/i/71f2e87df2be1cdbc44139ee3e2790eb_raster.png"></a>
+<a href="https://fiddle.skia.org/c/6af99894b40ea1331f6a79d55a4cbfd7">
+<img src="https://fiddle.skia.org/i/6af99894b40ea1331f6a79d55a4cbfd7_raster.png"></a>
The code above will draw a rectangle rotated by 45 degrees. Exactly
what color and style the rect will be drawn in is described by the
« no previous file with comments | « no previous file | site/user/tips.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698