[reportlab-users] diagonal ShadedRect and Clipping ?

Dinu Gherman reportlab-users@reportlab.com
Sat, 10 Aug 2002 10:44:22 +0200


Dirk Datzert:

> What will be fit best into your software philisophie ?
>
> 1. extending ShadedRect class to do new orientation =
> 'diagonal_leftup'/'diagonal_leftdown'/ 'angle' + and a new
> angle-AttrMapValue
> 2. new class derived from ShadedRect with new orientation and
> angle-AttrMapValue, I would call this class RotatedShadedRect.

As the originator of ShadedRect I'd prefer option 1, because adding
a new subclass to provide one more option doesn't make sense to me.
Of course, the best would be to have *any* angle, not just one out
of n*45 degrees, n in [0, 1, ...]. That means only one nmeric attri-
bute 'angle'.

The next step is then to generalise this for any polygon, not just
rectangles... ;-) When we're there we can throw away ShadedRect,
again... ;-)

Regards,

Dinu