From 2a021292f5a024e6f6b99be375e8ec2bf61718a8 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Tue, 17 Jul 2012 15:37:15 +0000 Subject: 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 --- gm/simpleaaclip.cpp | 11 +++++++---- 1 file 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; } } } -- cgit v1.2.3