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?
*/
}
}
-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];
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);