Correct a small mistake in SkPath::build_arc_conics
In this function, when count is 0, it maps the dst point to start, where
it should really be stop. A test case is also added.
In the test case, it should be drawing three lines, without the change in
SkPath class, it will draw 2 lines only with the top horizontal line
missing because it maps the dst point to the start point, and hence
the horizontal line is not drawn.
BUG=640031
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2409983004
Review-Url: https://chromiumcodereview.appspot.com/2409983004
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 59b63b8..d656876 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -1088,7 +1088,7 @@
int count = SkConic::BuildUnitArc(start, stop, dir, &matrix, conics);
if (0 == count) {
- matrix.mapXY(start.x(), start.y(), singlePt);
+ matrix.mapXY(stop.x(), stop.y(), singlePt);
}
return count;
}