Carsten Birn wrote:

I have experienced when you set a Graphics2D in the GraphicsNode paint method, the internal settings e.g color (setColor) changes to the last used color from the SVG document.

Can this be understood as an error?

I would consider it a "feature". It would be expensive to ensure that if you call paint on a GraphicsNode the Graphics2D is unchanged. We actually currently do significantly more setting/resetting than I would like, supporting this would only make this worse.

I would suggest that the Graphics2D keeps unchanged, otherwise some strange effects might happend. The problem is, that i am using using the GVT to paint SVG into a JPanel along with Graphics2D objects.

I would suggest that when you pass a mutable object into someone else's function, unless given assurances, you should assume that
it is changed. After all do you take care to restore the Graphics2D
state before you return from JPanel.paint? Most people don't.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to