Mercurial > dwindows
changeset 1274:885b55c0d7d7
Implemented DW_DRAW_FULL and DW_DRAW_FILL on OS/2.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 30 Oct 2011 02:13:47 +0000 |
parents | dfecd7b3c81e |
children | 0b34e2cf0706 |
files | os2/dw.c |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Sun Oct 30 02:10:24 2011 +0000 +++ b/os2/dw.c Sun Oct 30 02:13:47 2011 +0000 @@ -8685,7 +8685,15 @@ POINTL pts[2]; double r, a1, a2, a; int x3, y3; - + + /* Handle full circle/ellipse */ + if(flags & DW_DRAW_FULL) + { + /* Draw one half... */ + dw_draw_arc(handle, pixmap, flags & ~DW_DRAW_FULL, xorigin, yorigin, x2, y2, x1, y1); + /* ... then continue to draw the other half */ + } + if(handle) { hps = _set_colors(handle); @@ -8698,7 +8706,10 @@ } else return; - + + /* For a filled polygon 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); pts[0].x = x1; @@ -8720,6 +8731,8 @@ pts[1].y = thisheight - y2 - 1; /* Actually draw the arc */ GpiPointArc(hps, pts); + if(flags & DW_DRAW_FILL) + GpiEndArea(hps); if(!pixmap) WinReleasePS(hps);