From 24c8c085a0562165243bb931aeac75fb7298bee3 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 8 Sep 2015 23:40:49 -0400 Subject: [PATCH] More OS X work. --- macarea/draw.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/macarea/draw.c b/macarea/draw.c index 87a620cc..eb1abe82 100644 --- a/macarea/draw.c +++ b/macarea/draw.c @@ -59,7 +59,15 @@ void uiDrawRectangle(uiDrawContext *c, intmax_t x, intmax_t y, intmax_t width, i void uiDrawArcTo(uiDrawContext *c, intmax_t xCenter, intmax_t yCenter, intmax_t radius, double startAngle, double endAngle, int lineFromCurrentPointToStart) { if (!lineFromCurrentPointToStart) { - // TODO + // see http://stackoverflow.com/questions/31489157/extra-line-when-drawing-an-arc-in-swift + // TODO verify correctness + CGFloat x, y; + + x = xCenter; + y = yCenter; + x += radius * cos(startAngle); + y -= radius * sin(startAngle); + CGContextMoveToPoint(c->c, x, y); } CGContextAddArc(c->c, xCenter, yCenter,