mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 23:40:38 +00:00
Correct the geometry computation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28876 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
054405e8f3
commit
903ace2b7e
2 changed files with 7 additions and 2 deletions
|
@ -112,7 +112,6 @@
|
|||
angle -= 360.0;
|
||||
}
|
||||
|
||||
rad = PI * angle / 180;
|
||||
if (angle < 90.0)
|
||||
{
|
||||
startPoint = NSMakePoint(NSMinX(rect), NSMinY(rect));
|
||||
|
@ -129,7 +128,8 @@
|
|||
{
|
||||
startPoint = NSMakePoint(NSMinX(rect), NSMaxY(rect));
|
||||
}
|
||||
length = NSWidth(rect) * cos(rad) + NSHeight(rect) * sin(rad);
|
||||
rad = PI * angle / 180;
|
||||
length = abs(NSWidth(rect) * cos(rad) + NSHeight(rect) * sin(rad));
|
||||
endPoint = NSMakePoint(startPoint.x + length * cos(rad),
|
||||
startPoint.y + length * sin(rad));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue