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

Unified Diff: gm/strokes.cpp

Issue 1504043002: Ignore zero-length joins (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: let has_valid_tangent work with exhausted iter Created 5 years 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/strokes.cpp
diff --git a/gm/strokes.cpp b/gm/strokes.cpp
index aa2db9ccb288379d60e3703cff651415bc650a26..93d309aa0d2951443a7b307f5dd8196b32790a51 100644
--- a/gm/strokes.cpp
+++ b/gm/strokes.cpp
@@ -210,6 +210,32 @@ DEF_SIMPLE_GM(CubicStroke, canvas, 384, 384) {
canvas->drawPath(path, p);
}
+DEF_SIMPLE_GM(zerolinestroke, canvas, 90, 120) {
+ SkPaint paint;
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+ paint.setAntiAlias(true);
+ paint.setStrokeCap(SkPaint::kRound_Cap);
+
+ SkPath path;
+ path.moveTo(30, 90);
+ path.lineTo(30, 90);
+ path.lineTo(60, 90);
+ path.lineTo(60, 90);
+ canvas->drawPath(path, paint);
+
+ path.reset();
+ path.moveTo(30, 30);
+ path.lineTo(60, 30);
+ canvas->drawPath(path, paint);
+
+ path.reset();
+ path.moveTo(30, 60);
+ path.lineTo(30, 60);
+ path.lineTo(60, 60);
+ canvas->drawPath(path, paint);
+}
+
class Strokes2GM : public skiagm::GM {
SkPath fPath;
protected:
« 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