fixed text selection with --flatten
authorMatthias Kramm <kramm@quiss.org>
Thu, 6 Aug 2009 07:53:17 +0000 (09:53 +0200)
committerMatthias Kramm <kramm@quiss.org>
Thu, 6 Aug 2009 07:53:17 +0000 (09:53 +0200)
lib/devices/polyops.c
lib/gfxtools.c
lib/gfxtools.h

index 9893d1d..70fd99b 100644 (file)
@@ -315,9 +315,8 @@ void polyops_drawchar(struct _gfxdevice*dev, gfxfont_t*font, int glyphnr, gfxcol
            gfxbbox_t bbox2 = gfxline_getbbox(gfxline);
            double w = bbox2.xmax - bbox2.xmin;
            double h = bbox2.ymax - bbox2.ymin;
-           if(w < 0.001 || h < 0.001) /* character was clipped completely */ {
-           } else if(fabs((bbox.xmax - bbox.xmin) - w) > DEFAULT_GRID*2 ||
-                     fabs((bbox.ymax - bbox.ymin) - h) > DEFAULT_GRID*2) {
+           if(fabs((bbox.xmax - bbox.xmin) - w) > DEFAULT_GRID*2 ||
+              fabs((bbox.ymax - bbox.ymin) - h) > DEFAULT_GRID*2) {
                /* notable change in character size: character was clipped 
                   TODO: how to deal with diagonal cuts?
                 */
index 9143507..239ba6f 100644 (file)
@@ -831,7 +831,7 @@ void gfxfontlist_free(gfxfontlist_t*list, char deletefonts)
     }
 }
 
-gfxline_t*gfxline_makerectangle(int x1,int y1,int x2, int y2)
+gfxline_t*gfxline_makerectangle(double x1,double y1,double x2, double y2)
 {
     gfxline_t* line = (gfxline_t*)rfx_calloc(sizeof(gfxline_t)*5);
     line[0].x = x1;line[0].y = y1;line[0].type = gfx_moveTo;line[0].next = &line[1];
index a49a9b5..c2566d3 100644 (file)
@@ -87,7 +87,7 @@ void gfxfontlist_free(gfxfontlist_t*list, char deletefonts);
 
 gfxbbox_t* gfxline_isrectangle(gfxline_t*_l);
 
-gfxline_t*gfxline_makerectangle(int x1, int y1, int x2, int y2);
+gfxline_t*gfxline_makerectangle(double x1, double y1, double x2, double y2);
 gfxline_t*gfxline_makecircle(double x,double y,double rx, double ry);
 void gfxline_show(gfxline_t*line, FILE*fi);