Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: gm/aaclip.cpp

Issue 22947005: fine-tune tolerance for pinchy quads in stroker (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkStroke.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/aaclip.cpp
diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp
index 48df3a480f99f2ca742caebba11226d95ef4bec5..0725ea2d0f6f25c00808f73adb57ff70f69b4d86 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;
« no previous file with comments | « no previous file | src/core/SkStroke.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698