[gl2ps] line caps

Lance Putnam putnam.lance at gmail.com
Mon Jan 31 22:54:30 CET 2011


Hi,

I am having a problem when drawing thick line strips where I see noticeable
gaps at the joins in the output file. I discovered that if each vertex has a
different color, then the output file uses individual line segments rather
than a line strip. The same problem occurs with PDF, PS, and SVG files. At
this point, the line cap style plays an important role in the rendering
quality.

Eventually, I realized that, by default, individual lines use a butted line
cap. To use round caps with a PDF I had to add a "1 J" after the command
"/GSa gs" in the output file.

The attached images show the difference between the butt caps and round
caps. Notice the drastic improvement in quality by adding this single
command.

Are there plans to add line cap style as an option? Alternatively, would it
make sense to use round caps by default?

Lance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20110131/84a8c4c9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linecap_butted.pdf
Type: application/pdf
Size: 5830 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20110131/84a8c4c9/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linecap_rounded.pdf
Type: application/pdf
Size: 5830 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20110131/84a8c4c9/attachment-0001.pdf>