aboutsummaryrefslogtreecommitdiff
path: root/samplecode/SampleTextOnPath.cpp
diff options
context:
space:
mode:
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-08 13:15:37 +0000
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-08 13:15:37 +0000
commitc6ce750c73c6586a5c2e88a0620b04e9569af401 (patch)
treebfa313ab7b16bae4898a767524f510218ca71161 /samplecode/SampleTextOnPath.cpp
parent83edde21f3945f988656c023384bd33e87f8b48d (diff)
Fixed some fixed point build Windows compiler complaints
http://codereview.appspot.com/6197063/ git-svn-id: http://skia.googlecode.com/svn/trunk@3867 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleTextOnPath.cpp')
-rw-r--r--samplecode/SampleTextOnPath.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp
index 91100a64ee..00d9cba76b 100644
--- a/samplecode/SampleTextOnPath.cpp
+++ b/samplecode/SampleTextOnPath.cpp
@@ -21,7 +21,8 @@ static void textStrokePath(SkCanvas* canvas) {
canvas->save();
canvas->scale(SkIntToScalar(250),SkIntToScalar(250));
- rect.set(0.0f, 0.21f, 0.78f, 0.99f);
+ rect.set(SkFloatToScalar(0.0f), SkFloatToScalar(0.21f),
+ SkFloatToScalar(0.78f), SkFloatToScalar(0.99f));
path.addArc(rect, SkIntToScalar(280), SkIntToScalar(350));
@@ -41,7 +42,8 @@ static void textStrokePath(SkCanvas* canvas) {
const char* text = "DRAWING STROKED TEXT WITH A BLUR ON A PATH";
size_t len = strlen(text);
- canvas->drawTextOnPathHV(text, len, path, 0, -0.025f, paint);
+ canvas->drawTextOnPathHV(text, len, path, 0,
+ SkFloatToScalar(-0.025f), paint);
canvas->restore();
}