aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleFatBits.cpp
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-31 07:01:53 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-31 07:01:53 +0000
commit7ed98df9ba14bdb58e381508eb0505c963a4b6db (patch)
treeceb0a744d6f0fc467f49e8cafc7f72f182d4c98f /samplecode/SampleFatBits.cpp
parentcb505101a2bea28b99f770ed9d6f8de4cbcf0f20 (diff)
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@12043 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleFatBits.cpp')
-rw-r--r--samplecode/SampleFatBits.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/samplecode/SampleFatBits.cpp b/samplecode/SampleFatBits.cpp
index 10ec8e5f12..cf441cd45c 100644
--- a/samplecode/SampleFatBits.cpp
+++ b/samplecode/SampleFatBits.cpp
@@ -81,10 +81,10 @@ public:
bool getUseGPU() const { return fUseGPU; }
void setUseGPU(bool ug) { fUseGPU = ug; }
-
+
bool getTriangle() const { return fUseTriangle; }
void setTriangle(bool ut) { fUseTriangle = ut; }
-
+
void toggleRectAsOval() { fRectAsOval = !fRectAsOval; }
bool getUseClip() const { return fUseClip; }
@@ -343,42 +343,42 @@ void FatBits::drawRect(SkCanvas* canvas, SkPoint pts[2]) {
void FatBits::drawTriangleSkeleton(SkCanvas* max, const SkPoint pts[]) {
SkPaint paint;
this->setupSkeletonPaint(&paint);
-
+
SkPath path;
path.moveTo(pts[0]);
path.lineTo(pts[1]);
path.lineTo(pts[2]);
path.close();
-
+
max->drawPath(path, paint);
}
void FatBits::drawTriangle(SkCanvas* canvas, SkPoint pts[3]) {
SkPaint paint;
-
+
fInverse.mapPoints(pts, 3);
-
+
if (fGrid) {
apply_grid(pts, 3);
}
-
+
SkPath path;
path.moveTo(pts[0]);
path.lineTo(pts[1]);
path.lineTo(pts[2]);
path.close();
-
+
erase(fMinSurface);
this->setupPaint(&paint);
paint.setColor(FAT_PIXEL_COLOR);
fMinSurface->getCanvas()->drawPath(path, paint);
this->copyMinToMax();
-
+
SkCanvas* max = fMaxSurface->getCanvas();
-
+
fMatrix.mapPoints(pts, 3);
this->drawTriangleSkeleton(max, pts);
-
+
fMaxSurface->draw(canvas, 0, 0, NULL);
}
@@ -498,7 +498,7 @@ protected:
int index = -1;
int count = fFB.getTriangle() ? 3 : 2;
SkScalar tol = 12;
-
+
for (int i = 0; i < count; ++i) {
if (fPts[i].equalsWithinTolerance(pt, tol)) {
index = i;