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
diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp
index a46b488..b4d540c 100644
--- a/samplecode/SampleRegion.cpp
+++ b/samplecode/SampleRegion.cpp
@@ -28,8 +28,10 @@
     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 @@
     // 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 @@
 
     // 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);