Alan G Isaac venit, vidit, dixit 11.10.2009 17:13:
> Let's make a very simple drawing:
> 
> import pyx
> from pyx.canvas import canvas
> from pyx.path import path, moveto, rlineto
> pyx.unit.set(defaultunit='pt')
> mypath = path( moveto(72, 72), rlineto(234, 648))
> cvs = canvas()
> cvs.stroke(mypath)
> cvs.writePSfile('c:/temp/temp.ps')
> 
> The result is:
> 
> %%BeginPageSetup
> /pgsave save def
> %%EndPageSetup
> 0.566929 setlinewidth
> gsave
> newpath
> 72 72 moveto
> 234 648 rlineto
> stroke
> grestore
> pgsave restore
> showpage
> 
> In PostScript, the default linewidth should be 1 pt, right?
> (I realize I can set this explicitly at stroke time;
> I am asking about the default.)
> 
> Thanks,
> Alan Isaac

PyX's default linewidth is 0.02 * unit.w_cm, which is 0.566929133858
pts. I don't think the default linewidth should depend on the default
unit (and neither on the output format, be it ps, pdf, whatever else is
to come).

One may argue whether 1pt would be a better overall default, of course.

Cheers,
Michael


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to