More OS X work.

This commit is contained in:
Pietro Gagliardi 2015-09-08 23:40:49 -04:00
parent 8e18604fd9
commit 24c8c085a0
1 changed files with 9 additions and 1 deletions

View File

@ -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,