[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix, XGGState, DPSrectstroke
From: |
Georg Fleischmann |
Subject: |
Fix, XGGState, DPSrectstroke |
Date: |
Thu, 26 Jul 2001 23:51:28 +0200 |
here is a simple patch for XGGState, DPSrectstroke.
The fix avoids drawing of a very large rect for zero width or height.
2001-07-26 Georg Fleischmann
* xgps/Source/XGGState.m:
allow drawing of zero rectangles
diff -u xgps/Source/XGGState.m.old xgps/Source/XGGState.m
--- xgps/Source/XGGState.m.old Tue May 22 04:31:42 2001
+++ xgps/Source/XGGState.m Thu Jul 26 23:35:11 2001
@@ -1602,8 +1602,10 @@
DPS_ERROR(DPSinvalidid, @"No Drawable defined");
bounds = XGViewRectToX(self, NSMakeRect(x, y, w, h));
- bounds.width--;
- bounds.height--;
+ if (bounds.width > 0)
+ bounds.width--;
+ if (bounds.height > 0)
+ bounds.height--;
XDrawRectangle(XDPY, draw, xgcntxt,
bounds.x, bounds.y, bounds.width, bounds.height);
- Fix, XGGState, DPSrectstroke,
Georg Fleischmann <=