Yet another attempt to fix Win7 warnings/errors
git-svn-id: http://skia.googlecode.com/svn/trunk@9852 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SamplePathUtils.cpp b/samplecode/SamplePathUtils.cpp
index d6ef60e..cc56058 100644
--- a/samplecode/SamplePathUtils.cpp
+++ b/samplecode/SamplePathUtils.cpp
@@ -11,7 +11,7 @@
#include "SkView.h"
//#include "SkPathOps.h" // loads fine here, won't in PathUtils src files
#include "SkRandom.h"
-#include "SkTime.h"
+//#include "SkTime.h"
class samplePathUtils : public SampleView {
public:
@@ -23,7 +23,7 @@
protected:
static const int numModes = 3;
- static const int h=8, w=12, stride=2, kScale=10; // stride is in bytes
+ static const int h=8, w=12, stride=2; // stride is in bytes
static const int numChars = h * stride; // number of chars in entire array
SkPaint bmp_paint;
@@ -52,13 +52,14 @@
0xff, 0xf0, 0x19, 0x80, 0x36, 0xc0, 0xc0, 0x30 }
};
+ static const SkScalar kScale = 10.0f;
+
for (int i = 0; i < numModes; ++i) {
SkPath path; // generate and simplify each path
SkPathUtils::BitsToPath_Path(&path, (char*) &bits[i], h, w, stride);
canvas->save(); // DRAWING
- canvas->scale(SkIntToScalar(kScale),
- SkIntToScalar(kScale)); // scales up each bitmap
+ canvas->scale(kScale, kScale); // scales up each bitmap
canvas->translate(0, 1.5f * h * i);
canvas->drawPath(path, bmp_paint); // draw bitmap
canvas->restore();
@@ -68,8 +69,8 @@
SkPathUtils::BitsToPath_Region(&pathR, (char*) &bits[i], h, w, stride);
canvas->save();
- canvas->scale(SkIntToScalar(kScale),
- SkIntToScalar(kScale)); // scales up each bitmap
+
+ canvas->scale(kScale, kScale); // scales up each bitmap
canvas->translate(1.5f * w, 1.5f * h * i); // translates past previous bitmap
canvas->drawPath(pathR, bmp_paint); // draw bitmap
canvas->restore();