diff options
Diffstat (limited to 'gm/conicpaths.cpp')
-rw-r--r-- | gm/conicpaths.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gm/conicpaths.cpp b/gm/conicpaths.cpp index a5d5ee6d24..661f19fba9 100644 --- a/gm/conicpaths.cpp +++ b/gm/conicpaths.cpp @@ -72,6 +72,20 @@ protected: closedEllipse->moveTo(0, 0); closedEllipse->conicTo(100, 100, 0, 0, SK_ScalarHalf); } + { + const SkScalar w = SkScalarSqrt(2)/2; + fGiantCircle.moveTo(2.1e+11f, -1.05e+11f); + fGiantCircle.conicTo(2.1e+11f, 0, 1.05e+11f, 0, w); + fGiantCircle.conicTo(0, 0, 0, -1.05e+11f, w); + fGiantCircle.conicTo(0, -2.1e+11f, 1.05e+11f, -2.1e+11f, w); + fGiantCircle.conicTo(2.1e+11f, -2.1e+11f, 2.1e+11f, -1.05e+11f, w); + + } + } + + void drawGiantCircle(SkCanvas* canvas) { + SkPaint paint; + canvas->drawPath(fGiantCircle, paint); } void onDraw(SkCanvas* canvas) SK_OVERRIDE { @@ -104,10 +118,13 @@ protected: canvas->translate(0, 110); } canvas->restore(); + + this->drawGiantCircle(canvas); } private: SkTArray<SkPath> fPaths; + SkPath fGiantCircle; typedef skiagm::GM INHERITED; }; DEF_GM( return SkNEW(ConicPathsGM); ) |