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

Unified Diff: samplecode/SampleTextOnPath.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years, 1 month 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 | « samplecode/SampleText.cpp ('k') | samplecode/TransitionView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleTextOnPath.cpp
diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp
index bfb35f8159f2056c9d197f27819ae2ce70ce0c8a..f2b9af6732e92e89314f2c8240997920541fa692 100644
--- a/samplecode/SampleTextOnPath.cpp
+++ b/samplecode/SampleTextOnPath.cpp
@@ -22,29 +22,29 @@ static void textStrokePath(SkCanvas* canvas) {
canvas->save();
canvas->scale(SkIntToScalar(250),SkIntToScalar(250));
- rect.set(SkFloatToScalar(0.0f), SkFloatToScalar(0.21f),
- SkFloatToScalar(0.78f), SkFloatToScalar(0.99f));
+ rect.set(0.0f, 0.21f,
+ 0.78f, 0.99f);
path.addArc(rect, SkIntToScalar(280), SkIntToScalar(350));
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);
paint.setColor(0xFFFF0000);
- paint.setTextSize(SkFloatToScalar(0.085f));
- paint.setStrokeWidth(SkFloatToScalar(.005f));
+ paint.setTextSize(0.085f);
+ paint.setStrokeWidth(.005f);
canvas->drawPath(path, paint);
paint.setLooper(new SkBlurDrawLooper(SK_ColorBLACK,
- SkBlurMask::ConvertRadiusToSigma(SkFloatToScalar(0.002f)),
- SkFloatToScalar(0.0f),
- SkFloatToScalar(0.0f)))->unref();
+ SkBlurMask::ConvertRadiusToSigma(0.002f),
+ 0.0f,
+ 0.0f))->unref();
const char* text = "DRAWING STROKED TEXT WITH A BLUR ON A PATH";
size_t len = strlen(text);
canvas->drawTextOnPathHV(text, len, path, 0,
- SkFloatToScalar(-0.025f), paint);
+ -0.025f, paint);
canvas->restore();
}
« no previous file with comments | « samplecode/SampleText.cpp ('k') | samplecode/TransitionView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698