You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2006/09/01 18:48:55 UTC

DO NOT REPLY [Bug 40392] New: - JGVTComponent doesn't respect the opacity setting

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40392>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40392

           Summary: JGVTComponent doesn't respect the opacity setting
           Product: Batik
           Version: 1.6
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: GVT
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: kirillcool@yahoo.com


The JGVTComponent.paintComponent ignores the opacity setting and paints the
background in any case:

        g2d.setComposite(AlphaComposite.SrcOver);
        g2d.setPaint(getBackground());
        g2d.fillRect(visRect.x,     visRect.y, 
                     visRect.width, visRect.height);

A workaround is to set the background to new Color(0x0, true)

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

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


DO NOT REPLY [Bug 40392] - JGVTComponent doesn't respect the opacity setting

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40392>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40392


deweese@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From deweese@apache.org  2006-09-05 11:25 -------
(In reply to comment #0)
> The JGVTComponent.paintComponent ignores the opacity setting and paints the
> background in any case:

   I take it you are refering to:
      JComponent.setOpaque(boolean isOpaque)

   If so your 'workaround' is the correct answer.  One might
argue that Batik should look at the 'Background' given and
setOpaque(flase) if the background color has an alpha less
than 1.0 (255).  The purpose of setOpaque is to inform
Swing that it needs to draw any components that are 'under'
the canvas.  Otherwise it skips painting them under the
assumption that the Canvas will simply cover them.

> A workaround is to set the background to new Color(0x0, true)

   This is in fact the correct thing to do.


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

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