Hi there,

I have a strange problem where

from pyx import *

c = canvas.canvas()
c.stroke(path.line(0, 0, 0.05, 0))# .normpath(epsilon=None))

d = document.document([document.page(c)])
d.writeEPSfile(__file__[:-3])
d.writePDFfile(__file__[:-3],compress=0)

produces a PDF where the single line is not displayed correctly in
okular (KDE 4.5.3): The left end-point looks like a stair. The EPS looks
OK. Now, the EPS has

0 0 moveto
1.41732 0 lineto

whereas the PDF has

0.000000 0.000000 m
0.000000 0.000000 l
1.417323 0.000000 l

I tracked this down to the fact that the pdfwriter converts everything
to normpaths with epsilon=None. So, inserting the normpath conversion
from the comment above produces the extra 0 length line in EPS also. If
I use the standard epsilon it goes away (and both files display nicely).
This poses the following questions which are only partially pyx-related
(but which some here might be able to answer):

- Why does epsilon=None produce a line of length 0?
- Why doesn't the pdfwriter use the standard epsilon?
- Why does okular (using poppler) choke on that 0 length line in the PDF?
- Why does okular (using libspectre) not choke on the 0 length line in
the EPS (forced with explicit normpath conversion with epsilon=None)?
- Why does evince (using poppler) not choke on that very same PDF???

Any hints appreciated.

Michael

P.S.: acrobat probably does OK on this also; I've witnessed that problem
with okular on many of my presented slides (acrobat did fine) but have
banned acrobat since my last distro upgrade.


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel

Reply via email to