[reportlab-users] Widgets as Flowables...

Andy Robinson reportlab-users@reportlab.com
Wed, 18 Sep 2002 12:00:18 +0100


> Hi,
>
> taking the previous thread further... Isn't it unfortunate that
> Widgets can't be used directly as Flowables in Platypus?

I think the primitive concept is a Shape, not a Widget, and I'd do
it there if I did it anywhere, so you could do a rectangle as easily
as a pie chart.

Drawings are Flowables so you only need to wrap once, not twice.

At present Drawings have a defined size (at least, they did until
somebody demanded scaling :-) ) but the Shapes and Widgets inside
them do not know their own sizes or bounding boxes.  I can see it
is desirable one day for Shapes and Widgets to know their size,
but until we do that, how can we make them wrap?

Also, I am a bit worried about excessive permissiveness and
flexibility.
The whole 'graphics' package has a clean boundary between itself and
pdfgen/platypus, and the boundary is the Drawing class.  If that gets
relaxed and bits start leaking through, I can see we will end up
with "too many ways to do things".

It's a fair topic for "version 2" whether we should use "resuable
shape objects everywhere" or a "canvas metaphor everywhere". Being
able to use either one everywhere makes my head hurt, but I have
not analysed it properly yet so feel free to argue back.

- Andy