Yet another attempt to fix Win7 warnings/errors
git-svn-id: http://skia.googlecode.com/svn/trunk@9852 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
7d5758d118
commit
95faedb764
@ -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 @@ public:
|
||||
|
||||
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 @@ protected:
|
||||
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 @@ protected:
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user