aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-17 15:37:15 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-17 15:37:15 +0000
commit2a021292f5a024e6f6b99be375e8ec2bf61718a8 (patch)
treef51874376761e70d735de4a12386d9478e45f5ff /gm
parente9fdfb545d8e6af89f5b91cd55e44dfefc21d923 (diff)
Fixed simpleaaclip gm - it wasn't showing xor case
http://codereview.appspot.com/6402055/ This CL will require image rebaselining git-svn-id: http://skia.googlecode.com/svn/trunk@4636 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/simpleaaclip.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/gm/simpleaaclip.cpp b/gm/simpleaaclip.cpp
index 6873816b20..6ffa857b8b 100644
--- a/gm/simpleaaclip.cpp
+++ b/gm/simpleaaclip.cpp
@@ -149,14 +149,15 @@ protected:
{ SK_ColorBLACK, "Difference", SkRegion::kDifference_Op },
{ SK_ColorRED, "Intersect", SkRegion::kIntersect_Op },
{ 0xFF008800, "Union", SkRegion::kUnion_Op },
- { SK_ColorBLUE, "XOR", SkRegion::kXOR_Op },
{ SK_ColorGREEN, "Rev Diff", SkRegion::kReverseDifference_Op },
- { SK_ColorYELLOW, "Replace", SkRegion::kReplace_Op }
+ { SK_ColorYELLOW, "Replace", SkRegion::kReplace_Op },
+ { SK_ColorBLUE, "XOR", SkRegion::kXOR_Op },
};
SkPaint textPaint;
textPaint.setAntiAlias(true);
textPaint.setTextSize(SK_Scalar1*24);
+ int xOff = 0;
for (size_t op = 0; op < SK_ARRAY_COUNT(gOps); op++) {
canvas->drawText(gOps[op].fName, strlen(gOps[op].fName),
@@ -169,10 +170,12 @@ protected:
this->drawPathsOped(canvas, gOps[op].fOp, gOps[op].fColor);
}
- if (op && !(op % 3)) {
- canvas->translate(SkIntToScalar(-600), SkIntToScalar(250));
+ if (xOff >= 400) {
+ canvas->translate(SkIntToScalar(-400), SkIntToScalar(250));
+ xOff = 0;
} else {
canvas->translate(SkIntToScalar(200), 0);
+ xOff += 200;
}
}
}