Joerg Lehmann venit, vidit, dixit 15.10.2009 14:19:
> Hi Michael,
> 
> On 15.10.09, Michael J Gruber wrote:
>> I know that one, but is style.linewidth() an instance of trafo.trafo,
>> canvas.clip, style.strokestyle or style.fillstyle? I tried anyways, and
>> it worked, of course, because of the way attrs are handed down.
> 
> It's an instance of style.strokestyle.
> 
> On 15.10.09, Michael J Gruber wrote:
>> from pyx import *
>> ·
>> c = canvas.canvas()
>> c2 = canvas.canvas()
>> ·
>> c.stroke(path.line(0,0,0,1))
>> c2.stroke(path.line(1,0,1,1))
>> c2.stroke(path.line(2,0,2,1), [style.linewidth(0.2)])
>> ·
>> c.insert(c2, [style.linewidth(0.4)])
>> ·
>> c.stroke(path.line(3,0,3,1))
>> c2.stroke(path.line(4,0,4,1))
>> ·
>> c.writePDFfile(__file__[:-3])
>> ·
>> How many (even long time) users will get it right?
> 
> Hey, but that should all be obvious :-)

Yeah, yeah, I should have said "Andre + Joerg + Michael" ;)

> 
> (i) Setting PS attributes is done via the usual PS operators
> encapsulated in a gsave/grestore pair. The "last" operator of course takes
> precedence.

Of course, the last one is the one when I insert c2 into c. But it does
not take precedence. Because it's only the last in py(x) code, not the
last one in the resulting ps/pdf code. This is obvious once you know the
inner workings. But highly confusing if you think that "canvas.stroke"
actually strokes something on a canvas, at the time when you say "stroke".

It reminds me of the discussion we're having over at the git list. We
can't figure out a user-friendly UI simply because we know the inner
workings, so everything is obvious to us, and we can't comprehend how
anyone could be confused...

Cheers,
Michael
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