diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-15 20:57:42 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-15 20:57:42 +0000 |
commit | 439df286c89391f7e46c30d310cce4cb047dcd78 (patch) | |
tree | 8790cd30ab0316098205877599d58038880f4306 /gm/aaclip.cpp | |
parent | 44d662b86a504c1815ba0b73a3b83b599db2eed2 (diff) |
fine-tune tolerance for pinchy quads in stroker
BUG=
R=jvanverth@google.com
Review URL: https://codereview.chromium.org/22947005
git-svn-id: http://skia.googlecode.com/svn/trunk@10753 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/aaclip.cpp')
-rw-r--r-- | gm/aaclip.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp index 48df3a480f..0725ea2d0f 100644 --- a/gm/aaclip.cpp +++ b/gm/aaclip.cpp @@ -9,6 +9,26 @@ #include "SkCanvas.h" #include "SkPath.h" +static void test_quadstroke(SkCanvas* canvas) { + SkPath path; + path.moveTo(6, 0); + path.quadTo(150, 150, 0, 6); + + SkPaint paint; + + paint.setAntiAlias(true); + paint.setStyle(SkPaint::kStroke_Style); + canvas->translate(20, 20); + +#if 1 + canvas->drawPath(path, paint); + canvas->translate(100, 0); +#endif + + paint.setStrokeWidth(1.01f); + canvas->drawPath(path, paint); +} + static void draw_conic(SkCanvas* canvas, SkScalar weight, const SkPaint& paint) { SkPath path; path.moveTo(100, 100); @@ -253,6 +273,7 @@ protected: } virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + if (false) { test_quadstroke(canvas); return; } if (false) { test_conic(canvas); return; } if (false) { SkRect bounds; |