changeset 1276:1cdc18d760e0

Fixed improper fill method in dw_draw_rect() on OS/2. Also removed some unused variables and fixed some warnings.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 30 Oct 2011 10:19:35 +0000
parents 0b34e2cf0706
children 107e38a29eeb
files os2/dw.c
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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)