Made arc angles counterclockwise on the GTK+ backend and fixed the sun in the Direct2D geometries howto.
This commit is contained in:
parent
50f03eca14
commit
3cbc3f3c67
|
@ -554,7 +554,7 @@ static void drawD2DPathGeometries(uiAreaDrawParams *p)
|
|||
|
||||
sun = uiDrawNewPath(uiDrawFillModeWinding);
|
||||
uiDrawPathNewFigureWithArc(sun,
|
||||
440.0, 255,
|
||||
(440.0 - 270.0) / 2 + 270.0, 255,
|
||||
85,
|
||||
0, M_PI);
|
||||
uiDrawPathCloseFigure(sun);
|
||||
|
|
10
unix/draw.c
10
unix/draw.c
|
@ -152,14 +152,14 @@ static void runPath(uiDrawPath *p, cairo_t *cr)
|
|||
cairo_new_sub_path(cr);
|
||||
// fall through
|
||||
case arcTo:
|
||||
// the Windows AngleArc() function only goes counterclockwise, so our uiDrawArc() function does too
|
||||
// simulate it in cairo by drawing a negative arc from end to start
|
||||
cairo_arc_negative(cr,
|
||||
// cairo_arc() and cairo_arc_negative() only go clockwise
|
||||
// TODO explain why this works
|
||||
cairo_arc(cr,
|
||||
piece->d[0],
|
||||
piece->d[1],
|
||||
piece->d[2],
|
||||
piece->d[3] + piece->d[4],
|
||||
piece->d[3]);
|
||||
-(piece->d[3] + piece->d[4]),
|
||||
-(piece->d[3]));
|
||||
break;
|
||||
case lineTo:
|
||||
cairo_line_to(cr, piece->d[0], piece->d[1]);
|
||||
|
|
Loading…
Reference in New Issue