xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46353] New: setOpaque(false) not honoured
Date Fri, 05 Dec 2008 11:59:41 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46353

           Summary: setOpaque(false) not honoured
           Product: Batik
           Version: 1.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: GVT
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: java@dialsolutions.co.uk


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));


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message