aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/arcto.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-03-16 06:46:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-16 06:46:50 -0700
commit1b6934fcd968cf7e2d931bea3eefcd05a168ec3d (patch)
tree8a9a406f4cbef11ca98270c53e722c2535000aa9 /gm/arcto.cpp
parent9552ed31c1b4fdb02a5a2df36652caad44873100 (diff)
skip stroke outset of all teeny lines
Allow a small amount of slop when seeing if the previous moveTo and subsequent lineTo are the same. R=robertphillips@google.com BUG=593049 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1805913002 Review URL: https://codereview.chromium.org/1805913002
Diffstat (limited to 'gm/arcto.cpp')
-rw-r--r--gm/arcto.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/gm/arcto.cpp b/gm/arcto.cpp
index 2897e7ab86..cd26eef35a 100644
--- a/gm/arcto.cpp
+++ b/gm/arcto.cpp
@@ -187,3 +187,21 @@ DEF_SIMPLE_GM(parsedpaths, canvas, kParsePathTestDimension, kParsePathTestDimens
sk_fclose(file);
#endif
}
+
+DEF_SIMPLE_GM(bug593049, canvas, 300, 300) {
+ canvas->translate(111, 0);
+
+ SkPath p;
+ p.moveTo(-43.44464063610148f, 79.43535936389853f);
+ const SkScalar yOffset = 122.88f;
+ const SkScalar radius = 61.44f;
+ SkRect oval = SkRect::MakeXYWH(-radius, yOffset - radius, 2 * radius, 2 * radius);
+ p.arcTo(oval, 1.25f * 180, .5f * 180, false);
+
+ SkPaint paint;
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeCap(SkPaint::kRound_Cap);
+ paint.setStrokeWidth(15.36f);
+
+ canvas->drawPath(p, paint);
+}