[reportlab-users] Shape + Stroke problem
khalid y
kernity at gmail.com
Thu Jun 7 08:18:55 EDT 2012
Hi,
I'm using reporlab2.5 to draw some graphics and I'm using shapes for that
but I can not disable stroke ...
Here is my code :
#coding=utf-8
from reportlab.pdfgen.canvas import Canvas
from reportlab.graphics import shapes
from reportlab.graphics import renderPDF
from reportlab.lib import colors
if __name__=='__main__':
output = "output.pdf"
width = 400
height = 400
canvas = Canvas(output, pagesize=(width, height))
d = shapes.Drawing(width, height)
p = shapes.Path()
p.moveTo(0, 0)
p.lineTo(100, 100)
p.lineTo(20, 100)
p.lineTo(0, 0)
# Even if I have set the strokeWidth to 0, the stroke is always present
but thiner than 1...
p.strokeWidth = 0
d.add(p)
renderPDF.draw(d, canvas, 0, 0)
canvas.showPage()
canvas.save()
Cheers,
Thanks
Khalid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20120607/6df147e5/attachment.html>
More information about the reportlab-users
mailing list