diff --git a/gtkarea/draw.c b/gtkarea/draw.c index ba7977c7..06f0832e 100644 --- a/gtkarea/draw.c +++ b/gtkarea/draw.c @@ -49,7 +49,7 @@ void uiDrawRectangle(uiDrawContext *c, intmax_t x, intmax_t y, intmax_t width, i cairo_rectangle(c->cr, ((double) x) + 0.5, ((double) y) + 0.5, width, height); } -void uiDrawArc(uiDrawContext *c, intmax_t xCenter, intmax_t yCenter, intmax_t radius, double startAngle, double endAngle, int lineFromCurrentPointToStart) +void uiDrawArcTo(uiDrawContext *c, intmax_t xCenter, intmax_t yCenter, intmax_t radius, double startAngle, double endAngle, int lineFromCurrentPointToStart) { if (!lineFromCurrentPointToStart) cairo_new_sub_path(c->cr); diff --git a/gtkarea/main.c b/gtkarea/main.c index 001b9549..2b3db10e 100644 --- a/gtkarea/main.c +++ b/gtkarea/main.c @@ -53,7 +53,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p) uiDrawBeginPathRGB(p->Context, 0x80, 0xC0, 0x00); uiDrawMoveTo(p->Context, 400, 100); - uiDrawArc(p->Context, + uiDrawArcTo(p->Context, 400, 100, 50, 30. * (M_PI / 180.), @@ -63,7 +63,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p) 1); // TODO add a checkbox for this uiDrawLineTo(p->Context, 400, 100); - uiDrawArc(p->Context, + uiDrawArcTo(p->Context, 510, 100, 50, 30. * (M_PI / 180.), diff --git a/gtkarea/ui.h b/gtkarea/ui.h index 8a77ae9c..387a7f1f 100644 --- a/gtkarea/ui.h +++ b/gtkarea/ui.h @@ -67,7 +67,6 @@ struct uiDrawStrokeParams { uiDrawLineCap Cap; uiDrawLineJoin Join; intmax_t Thickness; - // TODO float for GDI? double MiterLimit; }; @@ -78,7 +77,7 @@ void uiDrawMoveTo(uiDrawContext *, intmax_t, intmax_t); void uiDrawLineTo(uiDrawContext *, intmax_t, intmax_t); void uiDrawRectangle(uiDrawContext *, intmax_t, intmax_t, intmax_t, intmax_t); // notes: angles are both relative to 0 and go counterclockwise -void uiDrawArc(uiDrawContext *, intmax_t, intmax_t, intmax_t, double, double, int); +void uiDrawArcTo(uiDrawContext *, intmax_t, intmax_t, intmax_t, double, double, int); // TODO behavior when there is no initial point on Windows and OS X void uiDrawBezierTo(uiDrawContext *, intmax_t, intmax_t, intmax_t, intmax_t, intmax_t, intmax_t); void uiDrawCloseFigure(uiDrawContext *); diff --git a/winarea/draw.c b/winarea/draw.c index 04bb6ce4..e1f53dd4 100644 --- a/winarea/draw.c +++ b/winarea/draw.c @@ -64,7 +64,7 @@ void uiDrawRectangle(uiDrawContext *c, intmax_t x, intmax_t y, intmax_t width, i logLastError("error drawing rectangle in uiDrawRectangle()"); } -void uiDrawArc(uiDrawContext *c, intmax_t xCenter, intmax_t yCenter, intmax_t radius, double startAngle, double endAngle, int lineFromCurrentPointToStart) +void uiDrawArcTo(uiDrawContext *c, intmax_t xCenter, intmax_t yCenter, intmax_t radius, double startAngle, double endAngle, int lineFromCurrentPointToStart) { if (!lineFromCurrentPointToStart) { int bx, by, bx2, by2; diff --git a/winarea/main.c b/winarea/main.c index 4db60ddb..3555fa50 100644 --- a/winarea/main.c +++ b/winarea/main.c @@ -51,7 +51,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p) uiDrawBeginPathRGB(p->Context, 0x80, 0xC0, 0x00); uiDrawMoveTo(p->Context, 400, 100); - uiDrawArc(p->Context, + uiDrawArcTo(p->Context, 400, 100, 50, 30. * (M_PI / 180.), @@ -61,7 +61,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p) 1); // TODO add a checkbox for this uiDrawLineTo(p->Context, 400, 100); - uiDrawArc(p->Context, + uiDrawArcTo(p->Context, 510, 100, 50, 30. * (M_PI / 180.), diff --git a/winarea/ui.h b/winarea/ui.h index 8a77ae9c..387a7f1f 100644 --- a/winarea/ui.h +++ b/winarea/ui.h @@ -67,7 +67,6 @@ struct uiDrawStrokeParams { uiDrawLineCap Cap; uiDrawLineJoin Join; intmax_t Thickness; - // TODO float for GDI? double MiterLimit; }; @@ -78,7 +77,7 @@ void uiDrawMoveTo(uiDrawContext *, intmax_t, intmax_t); void uiDrawLineTo(uiDrawContext *, intmax_t, intmax_t); void uiDrawRectangle(uiDrawContext *, intmax_t, intmax_t, intmax_t, intmax_t); // notes: angles are both relative to 0 and go counterclockwise -void uiDrawArc(uiDrawContext *, intmax_t, intmax_t, intmax_t, double, double, int); +void uiDrawArcTo(uiDrawContext *, intmax_t, intmax_t, intmax_t, double, double, int); // TODO behavior when there is no initial point on Windows and OS X void uiDrawBezierTo(uiDrawContext *, intmax_t, intmax_t, intmax_t, intmax_t, intmax_t, intmax_t); void uiDrawCloseFigure(uiDrawContext *);