Thomas DeWeese: > The way I would implement background-fill > would be in the various renderers. The JSVGCanvas > already has a method to set the background color > (Through swing's setBackground() method). The > transcoders have 'KEY_BACKGROUND_COLOR' which > could use the background from the outermost > SVG element. So I would modify these to look for > the property or get the 'backgroundColor' value from > the RootGraphicsNode and use it when another default > has not been given.
I think that's ok for the root svg element, but since every viewport-opening element can have a background-fill it needs to be drawn during rendering. For example: <svg version="1.2" width="400" height="400"> <svg x="100" y="100" width="200" height="200" background-fill="blue"/> <svg x="10" y="10" width="10" height="10" background-fill="red" background-fill-opacity="0.5" overflow="visible"/> </svg> The svg element with the translucent red background should cover the whole canvas, blending with the smaller blue backgrounded svg. > Otherwise, you are correct that there is no real > way to have this work given the infinite canvas > (you can do some things like check the clip on > the Graphics2D and fill that region, but AFAIK > there is no requirement that there be a clip, so > what do you fill in that case? ;) Well, just the area visible in JSVGCanvas or transcoded image I guess. I am not very familiar with how the renderer works. Would updating the CanvasGraphicsNode to have a new primitive bounds whenever the document is panned (as in option 3) be reasonable? Does it matter that getPrimitiveBounds would return an area smaller than the conceptual area that would be filled (returning the visible canvas size (clipped) instead of infinite)? Does off screen compositing have any extra considerations? Thanks, Cameron -- e-mail : cam (at) mcc.id.au icq : 26955922 web : http://mcc.id.au/ msn : cam-msn (at) aka.mcc.id.au office : +61399055779 jabber : heycam (at) jabber.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]