diff options
| author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-14 16:33:36 +0000 |
|---|---|---|
| committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-14 16:33:36 +0000 |
| commit | 4debcac8c38cae17a01e697578719c60a068052f (patch) | |
| tree | fe0f4e1b11fa773d8ce0eb446cb5912d8e055eea /samplecode/SampleRegion.cpp | |
| parent | 59bc8d4fa725da2a6cec3526859c488b577d5cce (diff) | |
Debug Windows compiler complaint fixes
http://codereview.appspot.com/6208055/
git-svn-id: http://skia.googlecode.com/svn/trunk@3924 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleRegion.cpp')
| -rw-r--r-- | samplecode/SampleRegion.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp index a46b488bf8..b4d540ca43 100644 --- a/samplecode/SampleRegion.cpp +++ b/samplecode/SampleRegion.cpp @@ -28,8 +28,10 @@ static void test_strokerect(SkCanvas* canvas) { SkScalar dy = 20; SkPath path; - path.addRect(0.0f, 0.0f, width, height, SkPath::kCW_Direction); - SkRect r = SkRect::MakeWH(width, height); + path.addRect(0.0f, 0.0f, + SkIntToScalar(width), SkIntToScalar(height), + SkPath::kCW_Direction); + SkRect r = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)); SkCanvas c(bitmap); c.translate(dx, dy); @@ -46,7 +48,7 @@ static void test_strokerect(SkCanvas* canvas) { // use the path c.clear(0); c.drawPath(path, paint); - canvas->drawBitmap(bitmap, 2*width, 0, NULL); + canvas->drawBitmap(bitmap, SkIntToScalar(2*width), 0, NULL); } static void drawFadingText(SkCanvas* canvas, @@ -74,7 +76,7 @@ static void drawFadingText(SkCanvas* canvas, // pos[1] value is where we start to fade, relative to the width // of our pts[] array. - const SkScalar pos[] = { 0, SkFloatToScalar(0.9), SK_Scalar1 }; + const SkScalar pos[] = { 0, SkFloatToScalar(0.9f), SK_Scalar1 }; SkShader* s = SkGradientShader::CreateLinear(pts, colors, pos, 3, SkShader::kClamp_TileMode); |
