Index: gm/circles.cpp |
diff --git a/gm/circles.cpp b/gm/circles.cpp |
index 734fcb5a0bbe3287e4e5b2fbd369fd55463590c1..2c9368be92fc7b01eb6f67e89eace17c7162c4f7 100644 |
--- a/gm/circles.cpp |
+++ b/gm/circles.cpp |
@@ -157,6 +157,17 @@ protected: |
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
SkLCGRandom rand; |
+ // Draw a giant AA circle as the background. |
+ SkISize size = this->getISize(); |
+ SkScalar giantRadius = SkTMin(SkIntToScalar(size.fWidth), |
+ SkIntToScalar(size.fHeight)) / 2.f; |
+ SkPoint giantCenter = SkPoint::Make(SkIntToScalar(size.fWidth/2), |
+ SkIntToScalar(size.fHeight/2)); |
+ SkPaint giantPaint; |
+ giantPaint.setAntiAlias(true); |
+ giantPaint.setColor(0x80808080); |
+ canvas->drawCircle(giantCenter.fX, giantCenter.fY, giantRadius, giantPaint); |
+ |
canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1); |
int i; |
for (i = 0; i < fPaints.count(); ++i) { |