[reportlab-users] constraining size of Drawing objects
Robin Becker
robin at reportlab.com
Tue Dec 4 05:23:26 EST 2007
Michael Hearne wrote:
> I've done some experimentation with svglib, and it seems to convert SVG
> files to Drawing objects pretty well, so I'd like to use that for vector
> images. However, the only documentation I've found for Drawing objects
> references the renderPDF.draw() method. This method, so far as I can
> tell, has no arguments that allow the caller to constrain the size of
> the Drawing.
>
> Does anyone know how to:
>
> a) Use svglib to convert an SVG file into a Flowable? OR
> b) Constrain the displayed size of a Drawing object?
>
> Thanks,
>
> Mike Hearne
.......
I'm still not clear what you mean by constrain the size of a drawing object.
Drawings have to know their own size.
If you have a drawing object and want to render it differently then it's always
possible to alter the position and scaling with canvas methods eg scale, rotate,
translate, skew etc etc.
There are two modes for Drawings one is as a drawing object. You can then save
them in a number of formats using the drawing.save method or if you have a
canvas you can use its methods to render a drawing.
Otherwise Drawings can act as a flowable in a platypus story. The normal
platypus actions then get the drawing rendered.
--
Robin Becker
More information about the reportlab-users
mailing list