summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-24 09:57:31 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-09-24 12:35:47 +0100
commit06a737b74d3bc925a2c32254f497e07b6d1af5ca (patch)
tree4b3156b1027fd2b45fd1db6c4cfc9b1d76af4ba9
parentbdd0721dcddd6c4528c9518a2152cd154f746202 (diff)
downloadcairo-06a737b74d3bc925a2c32254f497e07b6d1af5ca.tar.gz
arc: Insert the initial point on the arc
Currently the very first point on the arc will be the first interpreted location along the spline used to approximate the arc. This will be close, but not quite the exact point the user intended the arc to run from, so begin the arc with a line-to the initial point. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/cairo-arc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
index 5cbd11238..390397bae 100644
--- a/src/cairo-arc.c
+++ b/src/cairo-arc.c
@@ -236,6 +236,10 @@ _cairo_arc_in_direction (cairo_t *cr,
step = -step;
}
+ cairo_line_to (cr,
+ xc + radius * cos (angle_min),
+ yc + radius * sin (angle_min));
+
for (i = 0; i < segments; i++, angle_min += step) {
_cairo_arc_segment (cr, xc, yc, radius,
angle_min, angle_min + step);