+void fixAreas()
+{
+ if(!shapeisempty && fill &&
+ (bboxrect.xmin == bboxrect.xmax ||
+ bboxrect.ymin == bboxrect.ymax)) {
+ msg("<debug> Shape has size 0");
+
+ if(bboxrect.xmin == bboxrect.xmax && bboxrect.ymin == bboxrect.ymax) {
+ /* this thing comes down to a single dot- nothing to fix here */
+ return;
+ }
+
+ float x=0,y=0;
+ if(bboxrect.xmin == bboxrect.xmax) {
+ x = 0.05;
+ } else {
+ y = 0.05;
+ }
+ /* warning: doing this inside endshape() is dangerous */
+ moveto(tag, bboxrect.xmin/20.0, bboxrect.ymin/20.0);
+ lineto(tag, bboxrect.xmax/20.0 + x, bboxrect.ymin/20.0);
+ lineto(tag, bboxrect.xmax/20.0 + x, bboxrect.ymax/20.0 + y);
+ lineto(tag, bboxrect.xmin/20.0, bboxrect.ymax/20.0 + y);
+ lineto(tag, bboxrect.xmin/20.0, bboxrect.ymin/20.0);
+ }
+
+}
+