# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1319969975 0 # Node ID 1cdc18d760e0d499c74e3d049600c0a053a096dd # Parent 0b34e2cf0706e51e685f19c13d866daae2ec3292 Fixed improper fill method in dw_draw_rect() on OS/2. Also removed some unused variables and fixed some warnings. diff -r 0b34e2cf0706 -r 1cdc18d760e0 os2/dw.c --- a/os2/dw.c Sun Oct 30 10:14:49 2011 +0000 +++ b/os2/dw.c Sun Oct 30 10:19:35 2011 +0000 @@ -8629,7 +8629,7 @@ * width: Width of rectangle. * height: Height of rectangle. */ -void API dw_draw_rect(HWND handle, HPIXMAP pixmap, int fill, int x, int y, int width, int height) +void API dw_draw_rect(HWND handle, HPIXMAP pixmap, int flags, int x, int y, int width, int height) { HPS hps; int thisheight; @@ -8653,13 +8653,8 @@ ptl[1].x = x + width - 1; ptl[1].y = thisheight - y - height; - /* For a filled arc we need to start an area */ - if(flags & DW_DRAW_FILL) - GpiBeginArea(hps, 0L); GpiMove(hps, &ptl[0]); - GpiBox(hps, fill ? DRO_OUTLINEFILL : DRO_OUTLINE, &ptl[1], 0, 0); - if(flags & DW_DRAW_FILL) - GpiEndArea(hps); + GpiBox(hps, (flags & DW_DRAW_FILL) ? DRO_OUTLINEFILL : DRO_OUTLINE, &ptl[1], 0, 0); if(!pixmap) WinReleasePS(hps); @@ -8690,7 +8685,6 @@ ARCPARAMS ap = { 1, 1, 0, 0 }; POINTL pts[2]; double r, a1, a2, a; - int x3, y3; /* Handle full circle/ellipse */ if(flags & DW_DRAW_FULL)