# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1320050997 0 # Node ID 2c04a56eaf636647d743451b93d34ad77c5db55e # Parent 8cb3650eb242a34fdc9586ed5b5c23ea0d046668 Switched to using arcparams and GpiFullArc on OS/2 to draw the ellipse. Now that I understand how it works from info here: http://cyberkinetica.homeunix.net/os2tk45/gpi4/158_L5_DefininganEllipse.html diff -r 8cb3650eb242 -r 2c04a56eaf63 os2/dw.c --- a/os2/dw.c Mon Oct 31 06:06:09 2011 +0000 +++ b/os2/dw.c Mon Oct 31 08:49:57 2011 +0000 @@ -8703,34 +8703,23 @@ /* For a filled arc we need to start an area */ if(flags & DW_DRAW_FILL) GpiBeginArea(hps, 0L); - /* Setup the arc info on the presentation space */ - GpiSetArcParams(hps, &ap); /* Handle full circle/ellipse */ if(flags & DW_DRAW_FULL) { - int xmid = ((x2 - x1)/2) + x1; - int ymid = ((y2 - y1)/2) + y1; - - /* Draw one half... */ - pts[0].x = x1; - pts[0].y = thisheight - ymid - 1; + pts[0].x = xorigin; + pts[0].y = thisheight - yorigin - 1; GpiMove(hps, pts); - pts[0].x = xmid; - pts[0].y = thisheight - y1 - 1; - pts[1].x = x2; - pts[1].y = thisheight - ymid - 1; - GpiPointArc(hps, pts); - /* ... then continue to draw the other half */ - GpiMove(hps, &pts[1]); - pts[0].x = xmid; - pts[0].y = thisheight - y2 - 1; - pts[1].x = x1; - pts[1].y = thisheight - ymid - 1; - GpiPointArc(hps, pts); - } + ap.lP = (x2 - x1)/2; + ap.lQ = (y2 - y1)/2; + /* Setup the arc info on the presentation space */ + GpiSetArcParams(hps, &ap); + GpiFullArc(hps, DRO_OUTLINE, MAKEFIXED(1, 1)); + } else { + /* Setup the default arc info on the presentation space */ + GpiSetArcParams(hps, &ap); pts[0].x = x1; pts[0].y = thisheight - y1 - 1; /* Move to the initial position */