CtrlCore: GTK DrawArc fixed to draw ellipse (thanks mdelfede)

git-svn-id: svn://ultimatepp.org/upp/trunk@12245 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-09-04 11:42:40 +00:00
parent bd76e60e2f
commit d86f97d964

View file

@ -291,6 +291,9 @@ void SystemDraw::DrawArcOp(const Rect& rc, Point start, Point end, int width, Co
Pointf center = Pointf(rc.TopLeft()) + radius;
double ang1 = Bearing((Pointf(start) - center) / radius);
double ang2 = Bearing((Pointf(end) - center) / radius);
if(ang1 == ang2)
ang1 -= 0.000001;
cairo_move_to(cr, center.x + radius.cx * cos(ang1), center.y + radius.cy * sin(ang1));
cairo_save(cr);