[cairo] Line width in poppler
Carlos Garcia Campos
carlosgc at gnome.org
Tue Aug 4 03:57:13 PDT 2009
Hi all,
we have several bugs[1],[2] in poppler complaining about not visible
lines. The thing is that PDF allows 0 width lines: "A line width of 0
shall denote the thinnest line that can be rendered at device
resolution: 1 device pixel wide". We have already a 'workaround' for
this in poppler:
if (state->getLineWidth() == 0.0) {
/* find out how big pixels (device unit) are in the x and y directions
* choose the smaller of the two as our line width */
double x = 1.0, y = 1.0;
cairo_device_to_user_distance(cairo, &x, &y);
cairo_set_line_width (cairo, MIN(fabs(x),fabs(y)));
}
This seems to work for 0 width lines, but it doesn't work when the line
width is < 1. So the question is, should we adjust the line width
somehow when it's is less than the minimum device line width? how?
Thanks,
[1] http://bugs.freedesktop.org/show_bug.cgi?id=11288
[2] http://bugs.freedesktop.org/show_bug.cgi?id=4536
--
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
digitalmente
Url : http://lists.cairographics.org/archives/cairo/attachments/20090804/94928363/attachment.pgp
More information about the cairo
mailing list