[gl2ps] Intra-quad lines when blending

Christophe Geuzaine geuzaine at acm.caltech.edu
Thu Nov 25 04:48:18 CET 2004


Fabian Wenzel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi!
> 
> 
> I am using using gl2ps 1.2.1 and (apart from being happy most of the
> time) am experiencing some problems when blending. The resulting pdf is
> perfect except from a tiny hairline in a filled semitransparent GL_QUAD
> that looks like it is twice opaque as the rest. This hairline crosses
> the whole quad. The structure which is transparently occluded by the
> quad has some color artifacts (it seems to be partially non-occluded)
> near this intersecting hairline.

It's most probably because we split quads into triangles for sorting 
purposes.

> 
> Does anyone know how to deal with it? I could provide a 52k example file.

Yes, that would be useful.

> 
> Another hint which might be useful for other people: It has to be made
> sure that localization is turned off when using gl2ps via
> 
> unsigned char *oldlocale = setlocale(LC_NUMERIC,"C");
> 
> /* ... gl2ps-drawing-stuff */
> 
> setlocale(LC_NUMERIC,oldlocale);
> 
> I am using gl2ps in a wxWidgets-app that turns on localization by
> default. On my machine I ended up with corrupted output files before I
> figured out that they were caused by german localization as the decimal
> point is represented by a comma, so that the output streams were not the
> way acrobat and ghostscript wanted them to be.

Thanks--I'll add a note in the documentation.

Take care,

Christophe

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org