diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-08-29 18:05:05 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-08-29 18:05:05 +0000 |
commit | 574f29dfa7944879e3266ccdf47dc7f178f21104 (patch) | |
tree | e0943cc377031ee58fc4be011e1bbcdbe0e37cd5 /gm | |
parent | ddc518b90fdfa9f9c7b71e4c5cefd28f8da52e26 (diff) |
Add revisions to complexclip2.cpp from code review. Checkin windows baselines.
Review URL: http://codereview.appspot.com/4974048/
git-svn-id: http://skia.googlecode.com/svn/trunk@2186 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r-- | gm/complexclip2.cpp | 64 |
1 files changed, 25 insertions, 39 deletions
diff --git a/gm/complexclip2.cpp b/gm/complexclip2.cpp index 401f4afc7b..1c646988fa 100644 --- a/gm/complexclip2.cpp +++ b/gm/complexclip2.cpp @@ -1,10 +1,11 @@ - /* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + + #include "gm.h" #include "SkCanvas.h" #include "SkPath.h" @@ -32,57 +33,24 @@ public: fWidth = xF - xA; fHeight = yF - yA; - fRects[0].fLeft = xB; - fRects[0].fTop = yB; - fRects[0].fRight = xE; - fRects[0].fBottom = yE; + fRects[0].set(xB, yB, xE, yE); fRectColors[0] = SK_ColorRED; - fRects[1].fLeft = xA; - fRects[1].fTop = yA; - fRects[1].fRight = xD; - fRects[1].fBottom = yD; + fRects[1].set(xA, yA, xD, yD); fRectColors[1] = SK_ColorGREEN; - fRects[2].fLeft = xC; - fRects[2].fTop = yA; - fRects[2].fRight = xF; - fRects[2].fBottom = yD; + fRects[2].set(xC, yA, xF, yD); fRectColors[2] = SK_ColorBLUE; - fRects[3].fLeft = xA; - fRects[3].fTop = yC; - fRects[3].fRight = xD; - fRects[3].fBottom = yF; + fRects[3].set(xA, yC, xD, yF); fRectColors[3] = SK_ColorYELLOW; - fRects[4].fLeft = xC; - fRects[4].fTop = yC; - fRects[4].fRight = xF; - fRects[4].fBottom = yF; + fRects[4].set(xC, yC, xF, yF); fRectColors[4] = SK_ColorCYAN; fTotalWidth = kCols * fWidth + SK_Scalar1 * (kCols + 1) * kPadX; fTotalHeight = kRows * fHeight + SK_Scalar1 * (kRows + 1) * kPadY; - } - - virtual bool validForPicture() const { return false; } - -protected: - - static const int kRows = 5; - static const int kCols = 5; - static const int kPadX = 20; - static const int kPadY = 20; - - SkString onShortName() { - return SkString("complexclip2"); - } - SkISize onISize() { return make_isize(fTotalWidth, fTotalHeight); } - - void drawBG(SkCanvas* canvas) { - canvas->drawColor(SkColorSetRGB(0xDD,0xA0,0xDD)); SkRegion::Op ops[] = { SkRegion::kDifference_Op, SkRegion::kIntersect_Op, @@ -100,7 +68,25 @@ protected: } } } + } + + virtual bool validForPicture() const { return false; } + +protected: + static const int kRows = 5; + static const int kCols = 5; + static const int kPadX = 20; + static const int kPadY = 20; + + SkString onShortName() { + return SkString("complexclip2"); + } + + SkISize onISize() { return make_isize(fTotalWidth, fTotalHeight); } + + void drawBG(SkCanvas* canvas) { + canvas->drawColor(SkColorSetRGB(0xDD,0xA0,0xDD)); } virtual void onDraw(SkCanvas* canvas) { |