diff options
author | Tor Lillqvist <tml@iki.fi> | 2004-03-31 00:50:13 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2004-03-31 00:50:13 +0000 |
commit | 0ddaed29e9a47be6503ab9a976590338b82ae29e (patch) | |
tree | 82d12daa5509a67756e0ec0663dfec809a809181 /gdk | |
parent | 75c539334ace1e8014d80cba4ed9fe6c7be84334 (diff) | |
download | gtk+-0ddaed29e9a47be6503ab9a976590338b82ae29e.tar.gz |
Use X11 semantics for angles. Thanks to Tim Newsham.
2004-03-31 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdrawable-win32.c (draw_arc): Use X11 semantics for
angles. Thanks to Tim Newsham.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/win32/gdkdrawable-win32.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c index 026e1ac2d2..acc6757f78 100644 --- a/gdk/win32/gdkdrawable-win32.c +++ b/gdk/win32/gdkdrawable-win32.c @@ -802,12 +802,9 @@ draw_arc (GdkGCWin32 *gcwin32, { HGDIOBJ old_pen; gboolean filled; - gint x; - gint y; - gint width; - gint height; - gint angle1; - gint angle2; + gint x, y; + gint width, height; + gint angle1, angle2; int nXStartArc, nYStartArc, nXEndArc, nYEndArc; filled = va_arg (args, gboolean); @@ -827,18 +824,17 @@ draw_arc (GdkGCWin32 *gcwin32, } else if (angle2 > 0) { - /* The 100. is just an arbitrary value */ - nXStartArc = x + width/2 + 100. * cos(angle1/64.*2.*G_PI/360.); - nYStartArc = y + height/2 + -100. * sin(angle1/64.*2.*G_PI/360.); - nXEndArc = x + width/2 + 100. * cos((angle1+angle2)/64.*2.*G_PI/360.); - nYEndArc = y + height/2 + -100. * sin((angle1+angle2)/64.*2.*G_PI/360.); + nXStartArc = x + width/2 + width * cos(angle1/64.*2.*G_PI/360.); + nYStartArc = y + height/2 + -height * sin(angle1/64.*2.*G_PI/360.); + nXEndArc = x + width/2 + width * cos((angle1+angle2)/64.*2.*G_PI/360.); + nYEndArc = y + height/2 + -height * sin((angle1+angle2)/64.*2.*G_PI/360.); } else { - nXEndArc = x + width/2 + 100. * cos(angle1/64.*2.*G_PI/360.); - nYEndArc = y + height/2 + -100. * sin(angle1/64.*2.*G_PI/360.); - nXStartArc = x + width/2 + 100. * cos((angle1+angle2)/64.*2.*G_PI/360.); - nYStartArc = y + height/2 + -100. * sin((angle1+angle2)/64.*2.*G_PI/360.); + nXEndArc = x + width/2 + width * cos(angle1/64.*2.*G_PI/360.); + nYEndArc = y + height/2 + -height * sin(angle1/64.*2.*G_PI/360.); + nXStartArc = x + width/2 + width * cos((angle1+angle2)/64.*2.*G_PI/360.); + nYStartArc = y + height/2 + -height * sin((angle1+angle2)/64.*2.*G_PI/360.); } if (filled) |