[reportlab-users] renderSVG bug

Eric Johnson reportlab-users@reportlab.com
Mon, 14 Oct 2002 06:51:22 +0200 (MEST)


This is a MIME encapsulated multipart message -
please use a MIME-compliant e-mail program to open it.

Dies ist eine mehrteilige Nachricht im MIME-Format -
bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm.

--========GMXBoundary222151034571082
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

There appears to be a bug in the renderSVG code that handles paths. 
The problem arises in the _fillAndStroke method when used with a path that 
is not 
closed.  The problem appears to be that the renderer does uses the default 
fill 
in this case rather than setting "fill: none" 
 
A simple fix for this is to add the following line as the first line in 
the 
_fillAndStroke method in renderSVG.py. 
        self.setFillColor(self._fillColor) 
 
It may be more elegant to use the applyStateChange method. 
 
Attached is a simple example illustrating the bug. 
 
Eric 
  

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
--========GMXBoundary222151034571082
Content-Type: text/x-python; name="svgbug.py"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="svgbug.py"

IyEgL3Vzci9iaW4vZW52IHB5dGhvbg0KIw0KDQpmcm9tIHJlcG9ydGxhYi5ncmFwaGljcyBpbXBv
cnQgcmVuZGVyUERGLCByZW5kZXJQUywgcmVuZGVyU1ZHDQpmcm9tIHJlcG9ydGxhYi5ncmFwaGlj
cyBpbXBvcnQgc2hhcGVzDQoNCiMjIyMjIyMjIyMjIyMjIyMjIyMjDQpkID0gc2hhcGVzLkRyYXdp
bmcoMjAwLCAyMDApDQpnID0gc2hhcGVzLkdyb3VwKCkNCnAgPSBbICgnbW92ZVRvJywgMCwgMCks
ICgnbGluZVRvJywgMTAwLCAxMDApLCAoJ2xpbmVUbycsIDEwMCwgMCkgXQ0KZy5hZGQoIHNoYXBl
cy5kZWZpbmVQYXRoKHApICkNCmQuYWRkKGcpDQoNCg0KcmVuZGVyU1ZHLmRyYXdUb0ZpbGUoZCwg
J3N2Z2J1Zy5zdmcnKQ0KcmVuZGVyUERGLmRyYXdUb0ZpbGUoZCwgJ3N2Z2J1Zy5wZGYnKQ0KcmVu
ZGVyUFMuZHJhd1RvRmlsZShkLCAnc3ZnYnVnLnBzJykNCg==

--========GMXBoundary222151034571082--