Details
-
Bug
-
Status: Resolved
-
Resolution: Incomplete
-
1.7
-
None
-
None
-
Operating System: All
Platform: All
Description
JSVGCanvas and JSVGComponent ignore setOpaque() and always draw a background
I think it's becuase
AbstractJGVTComponent.paintComponent
always does this...
g2d.setComposite(AlphaComposite.SrcOver);
g2d.setPaint(getBackground());
g2d.fillRect(visRect.x, visRect.y,
visRect.width, visRect.height);
but perhaps this should be wrapped in a isOpaque check?
if{isOpqaue())
{
g2d.setComposite(AlphaComposite.SrcOver);
g2d.setPaint(getBackground());
g2d.fillRect(visRect.x, visRect.y,
visRect.width, visRect.height);
}
current workaround (which maybe processor heavy) is to set the component background to a color with a alpha channel set to 0 (e.g. setBackground(new Color(0,0,0,0));