aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/conicpaths.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-01-20 07:46:05 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-20 07:46:05 -0800
commit2b39ffc9d225419b6122e8d31da2ab9c797301c6 (patch)
tree9b3eb3f517ec008cf514c6e7b88a35e44a39c703 /gm/conicpaths.cpp
parent323c2ebe9e171d399c922f1efb5b6a2ca9d56b2e (diff)
add arc circle gap gm
The circle and arc don't line up because the circle uses conics and arc uses quadratics. TBR=reed@google.com BUG=578885 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1606263002 Review URL: https://codereview.chromium.org/1606263002
Diffstat (limited to 'gm/conicpaths.cpp')
-rw-r--r--gm/conicpaths.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/gm/conicpaths.cpp b/gm/conicpaths.cpp
index 71057b8e0b..91c337f926 100644
--- a/gm/conicpaths.cpp
+++ b/gm/conicpaths.cpp
@@ -132,3 +132,18 @@ DEF_GM(return new ConicPathsGM;)
//////////////////////////////////////////////////////////////////////////////
+/* arc should be on top of circle */
+DEF_SIMPLE_GM(arccirclegap, canvas, 250, 250) {
+ canvas->translate(50, 100);
+ SkPoint c = { 1052.5390625f, 506.8760978034711f };
+ SkScalar radius = 1096.702150363923f;
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ canvas->drawCircle(c.fX, c.fY, radius, paint);
+ SkPath path;
+ path.moveTo(288.88884710654133f, -280.26680862609f);
+ path.arcTo(0, 0, -39.00216443306411f, 400.6058925796476f, radius);
+ paint.setColor(0xff007f00);
+ canvas->drawPath(path, paint);
+}