+void cancelshape(swfoutput*obj)
+{
+ /* delete old shape tag */
+ TAG*todel = tag;
+ tag = tag->prev;
+ swf_DeleteTag(todel);
+ shapeid = -1;
+ bboxrectpos = -1;
+}
+
+void fixAreas(swfoutput*obj)
+{
+ if(!shapeisempty && fill &&
+ (bboxrect.xmin == bboxrect.xmax ||
+ bboxrect.ymin == bboxrect.ymax) &&
+ minlinewidth >= 0.001
+ ) {
+ msg("<debug> Shape has size 0: width=%.2f height=%.2f",
+ (bboxrect.xmax-bboxrect.xmin)/20.0,
+ (bboxrect.ymax-bboxrect.ymin)/20.0
+ );
+
+ SRECT r = bboxrect;
+
+ if(r.xmin == r.xmax && r.ymin == r.ymax) {
+ /* this thing comes down to a single dot- nothing to fix here */
+ return;
+ }
+
+ cancelshape(obj);
+
+ RGBA save_col = obj->strokergb;
+ int save_width = linewidth;
+
+ obj->strokergb = obj->fillrgb;
+ linewidth = (int)(minlinewidth*20);
+ if(linewidth==0) linewidth = 1;
+
+ startshape(obj);
+
+ moveto(tag, r.xmin/20.0,r.ymin/20.0);
+ lineto(tag, r.xmax/20.0,r.ymax/20.0);
+
+ obj->strokergb = save_col;
+ linewidth = save_width;
+ }
+
+}
+
+static void endshape(swfoutput*obj, int clipdepth)