mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
bd76e60e2f
commit
d86f97d964
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue