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

Unified Diff: gm/stringart.cpp

Issue 24258003: Type warning fix for: Add string art GM and sample. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Missing nit Created 7 years, 3 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 | samplecode/SampleStringArt.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/stringart.cpp
diff --git a/gm/stringart.cpp b/gm/stringart.cpp
index 1dc86efef7296177e855043fc36fba165290a09f..006dfe75247f93825d84cd48c6632b7117fd9083 100644
--- a/gm/stringart.cpp
+++ b/gm/stringart.cpp
@@ -11,8 +11,8 @@
// Reproduces https://code.google.com/p/chromium/issues/detail?id=279014
-static const int kWidth = 640;
-static const int kHeight = 480;
+static const SkScalar kWidth = SkIntToScalar(640);
+static const SkScalar kHeight = SkIntToScalar(480);
static const SkScalar kAngle = 0.305f;
// Renders a string art shape.
@@ -33,7 +33,7 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
SkScalar angle = kAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI);
- SkScalar size = SkMin32(kWidth, kHeight);
+ SkScalar size = SkMinScalar(kWidth, kHeight);
SkPoint center = SkPoint::Make(SkScalarHalf(kWidth), SkScalarHalf(kHeight));
SkScalar length = 5;
SkScalar step = angle;
« no previous file with comments | « no previous file | samplecode/SampleStringArt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698