a gfxline into a gfxpoly- for polygons which are too
complex or just degenerate, this might fail. So handle
all the cases where polygon conversion or intersection
- might go awry */
+ might go awry
+ UPDATE: this is not needed anymore. The new gfxpoly
+ implementation is stable enough so it always returns
+ a valid result. Still, it's good practice.
+ */
if(!poly && !oldclip) {
i->out->startclip(i->out,line);
currentclip = 0;
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?
*/
+ msg("<trace> Character %d was clipped: (%f,%f,%f,%f) -> (%f,%f,%f,%f)",
+ glyphnr,
+ bbox.xmin,bbox.ymin,bbox.xmax,bbox.ymax,
+ bbox2.xmin,bbox2.ymin,bbox2.xmax,bbox2.ymax);
polyops_fill(dev, glyph, color);
} else {
if(i->out) i->out->drawchar(i->out, font, glyphnr, color, matrix);