Renamed uiDrawArc to uiDrawArcTo.
This commit is contained in:
parent
61fee661c2
commit
4d97644f94
|
@ -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);
|
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)
|
if (!lineFromCurrentPointToStart)
|
||||||
cairo_new_sub_path(c->cr);
|
cairo_new_sub_path(c->cr);
|
||||||
|
|
|
@ -53,7 +53,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p)
|
||||||
|
|
||||||
uiDrawBeginPathRGB(p->Context, 0x80, 0xC0, 0x00);
|
uiDrawBeginPathRGB(p->Context, 0x80, 0xC0, 0x00);
|
||||||
uiDrawMoveTo(p->Context, 400, 100);
|
uiDrawMoveTo(p->Context, 400, 100);
|
||||||
uiDrawArc(p->Context,
|
uiDrawArcTo(p->Context,
|
||||||
400, 100,
|
400, 100,
|
||||||
50,
|
50,
|
||||||
30. * (M_PI / 180.),
|
30. * (M_PI / 180.),
|
||||||
|
@ -63,7 +63,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p)
|
||||||
1);
|
1);
|
||||||
// TODO add a checkbox for this
|
// TODO add a checkbox for this
|
||||||
uiDrawLineTo(p->Context, 400, 100);
|
uiDrawLineTo(p->Context, 400, 100);
|
||||||
uiDrawArc(p->Context,
|
uiDrawArcTo(p->Context,
|
||||||
510, 100,
|
510, 100,
|
||||||
50,
|
50,
|
||||||
30. * (M_PI / 180.),
|
30. * (M_PI / 180.),
|
||||||
|
|
|
@ -67,7 +67,6 @@ struct uiDrawStrokeParams {
|
||||||
uiDrawLineCap Cap;
|
uiDrawLineCap Cap;
|
||||||
uiDrawLineJoin Join;
|
uiDrawLineJoin Join;
|
||||||
intmax_t Thickness;
|
intmax_t Thickness;
|
||||||
// TODO float for GDI?
|
|
||||||
double MiterLimit;
|
double MiterLimit;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,7 +77,7 @@ void uiDrawMoveTo(uiDrawContext *, intmax_t, intmax_t);
|
||||||
void uiDrawLineTo(uiDrawContext *, intmax_t, intmax_t);
|
void uiDrawLineTo(uiDrawContext *, intmax_t, intmax_t);
|
||||||
void uiDrawRectangle(uiDrawContext *, intmax_t, intmax_t, 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
|
// 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
|
// 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 uiDrawBezierTo(uiDrawContext *, intmax_t, intmax_t, intmax_t, intmax_t, intmax_t, intmax_t);
|
||||||
void uiDrawCloseFigure(uiDrawContext *);
|
void uiDrawCloseFigure(uiDrawContext *);
|
||||||
|
|
|
@ -64,7 +64,7 @@ void uiDrawRectangle(uiDrawContext *c, intmax_t x, intmax_t y, intmax_t width, i
|
||||||
logLastError("error drawing rectangle in uiDrawRectangle()");
|
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) {
|
if (!lineFromCurrentPointToStart) {
|
||||||
int bx, by, bx2, by2;
|
int bx, by, bx2, by2;
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p)
|
||||||
|
|
||||||
uiDrawBeginPathRGB(p->Context, 0x80, 0xC0, 0x00);
|
uiDrawBeginPathRGB(p->Context, 0x80, 0xC0, 0x00);
|
||||||
uiDrawMoveTo(p->Context, 400, 100);
|
uiDrawMoveTo(p->Context, 400, 100);
|
||||||
uiDrawArc(p->Context,
|
uiDrawArcTo(p->Context,
|
||||||
400, 100,
|
400, 100,
|
||||||
50,
|
50,
|
||||||
30. * (M_PI / 180.),
|
30. * (M_PI / 180.),
|
||||||
|
@ -61,7 +61,7 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p)
|
||||||
1);
|
1);
|
||||||
// TODO add a checkbox for this
|
// TODO add a checkbox for this
|
||||||
uiDrawLineTo(p->Context, 400, 100);
|
uiDrawLineTo(p->Context, 400, 100);
|
||||||
uiDrawArc(p->Context,
|
uiDrawArcTo(p->Context,
|
||||||
510, 100,
|
510, 100,
|
||||||
50,
|
50,
|
||||||
30. * (M_PI / 180.),
|
30. * (M_PI / 180.),
|
||||||
|
|
|
@ -67,7 +67,6 @@ struct uiDrawStrokeParams {
|
||||||
uiDrawLineCap Cap;
|
uiDrawLineCap Cap;
|
||||||
uiDrawLineJoin Join;
|
uiDrawLineJoin Join;
|
||||||
intmax_t Thickness;
|
intmax_t Thickness;
|
||||||
// TODO float for GDI?
|
|
||||||
double MiterLimit;
|
double MiterLimit;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,7 +77,7 @@ void uiDrawMoveTo(uiDrawContext *, intmax_t, intmax_t);
|
||||||
void uiDrawLineTo(uiDrawContext *, intmax_t, intmax_t);
|
void uiDrawLineTo(uiDrawContext *, intmax_t, intmax_t);
|
||||||
void uiDrawRectangle(uiDrawContext *, intmax_t, intmax_t, 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
|
// 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
|
// 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 uiDrawBezierTo(uiDrawContext *, intmax_t, intmax_t, intmax_t, intmax_t, intmax_t, intmax_t);
|
||||||
void uiDrawCloseFigure(uiDrawContext *);
|
void uiDrawCloseFigure(uiDrawContext *);
|
||||||
|
|
Loading…
Reference in New Issue