|Post Comments on Proposal for Background support in Figures [message #222384]
||Thu, 31 August 2006 13:43
Originally posted by: none.us.ibm.com|
I've opened a feature request for figures to support pluggable backgrounds.
Here's a common problem. I want to create a figure that is a rounded
rectangle with the inside are filled using some color. This is currently
impossible with borders and figures. The border will paint a rounded
rectangle, but the figure will paint a rectangle either inside or underneath
the border. The result is that you end up creating a custom figure class.
So, what if the border has the chance to paint first, and last, instead of
just last. It could then fill the rounded background, the children would
then paint, and then it could draw the border last. In many cases the border
could have been drawn first too. This is a minor change but it seems to
offer a lot of flexibility.
The proposal is to create an interface called BackgroundBorder extending
So, we'd like to hear about how people might use this support. Outstanding
1) Does the background get to make changes to the Graphics that affect the
figure's children? Probably not, since this would impact the lookup of font,
fgcolor, bgcolor, etc. So, after the background paints, the graphics would
be restored to the previous state. I guess that issue is resolved, unless
someone has a convincing use case.
2) Does it make sense to compose two backgrounds? What about composing a
background and traditional borders? If we compose backgrounds, would there
be a separate Insets that determine how the backgrounds nest independant of
how the borders nest?
3) What would people be looking for? Gradient-filled areas? Drop shadows?
Powered by FUDForum
. Page generated in 0.02083 seconds