Hi,

multilinto_pt is a path element, not a path. You cannot stroke path elements, 
for example:

    from pyx import *
    c = canvas.canvas()
    c.stroke(path.path(path.moveto(0, 0), path.lineto(1, 0)))   # works
    c.stroke(path.path(path.moveto(0, 0), path.multilineto_pt([(1, 0)])))  # 
works as well
    c.stroke(path.lineto(1, 0))  # fails
    c.stroke(path.multilineto_pt([(1, 0)]))  # fails as well
    c.writePDFfile()

Best,


André

Am 08.05.2016 um 11:50 schrieb René Bastian <[email protected]>:

> The same with path.path(path.moveto(...), path.lineto(...), ...)
> works.
> 
> rb
> 
> Le Sun, 08 May 2016 08:07:02 -0000,
> [email protected] a écrit :
> 
>> 
>> 2016.05.07
>> 
>> Hallo André & Cie,
>> 
>> Woas isch do loos?
>> 
>>    def ligature(self, pt, duree, h0, h1):
>>        dh = 0.2
>>        x0 = unit.topt(pt)
>>        x1 = unit.topt(pt + duree)
>>        y00 = unit.topt(h0)
>>        y01 = unit.topt(h0 - dh)
>>        y10 = unit.topt(h1)
>>        y11 = unit.topt(h1 - dh)
>>        s = path.multilineto_pt([x0, y00, x0, y01, x1, y11, x1, y10,
>> x0, y00]) self.c.stroke(s)
>> 
>> File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 50, in
>> wrappedindocument return method(d, file, **write_kwargs)
>>  File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 185, in
>> writeEPSfile pswriter.EPSwriter(self, f, **kwargs)
>>  File "/home/rbm/Python/PyX-0.14.1/pyx/pswriter.py", line 142, in
>> __init__ page.processPS(pagefile, self, acontext, registry, pagebbox)
>>  File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 132, in
>> processPS self._process("processPS", *args)
>>  File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 78, in
>> _process bbox.set(self.canvas.bbox()) # this bbox is not accurate
>>  File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 179, in bbox
>>    obbox += cmd.bbox()
>>  File "/home/rbm/Python/PyX-0.14.1/pyx/deco.py", line 101, in bbox
>>    pathbbox = self.path.bbox()
>> AttributeError: 'multilineto_pt' object has no attribute 'bbox'
>> 
>> @+
>> 
>> rb
>> 
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications
>> Manager Applications Manager provides deep performance insights into
>> multiple tiers of your business applications. It resolves application
>> problems quickly and reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> PyX-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pyx-user
> 
> 
> 
> -- 
> René Bastian
> www.pythoneon.org
> 
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> PyX-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyx-user

-- 
by  _ _      _    Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
   / \ \    / )   [email protected], http://www.wobsta.de/
  / _ \ \/\/ /    PyX - High quality PostScript and PDF figures
 (_/ \_)_/\_/     with Python & TeX: visit http://pyx.sourceforge.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to