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

Unified Diff: gm/bug530095.cpp

Issue 1766243004: don't create zero length intervals (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/utils/SkDashPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bug530095.cpp
diff --git a/gm/bug530095.cpp b/gm/bug530095.cpp
index 690da3c9d0ba054b4f2094a522e9bdfffcfed264..76f6bc8f2e55f15cb80714ab2f2f02ac94f45548 100644
--- a/gm/bug530095.cpp
+++ b/gm/bug530095.cpp
@@ -46,3 +46,16 @@ DEF_SIMPLE_GM(bug530095, canvas, 900, 1200) {
canvas->translate(4, 4);
canvas->drawPath(path2, paint);
}
+
+DEF_SIMPLE_GM(bug591993, canvas, 40, 140) {
+ SkPaint p;
+ p.setColor(SK_ColorRED);
+ p.setAntiAlias(true);
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeCap(SkPaint::kRound_Cap);
+ p.setStrokeWidth(10);
+ SkScalar intervals[] = { 100, 100 };
+ SkPathEffect* dash = SkDashPathEffect::Create(intervals, SK_ARRAY_COUNT(intervals), 100);
+ p.setPathEffect(dash)->unref();
+ canvas->drawLine(20, 20, 120, 20, p);
+}
« no previous file with comments | « no previous file | src/utils/SkDashPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698