You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Dmitriy Matveev (JIRA)" <ji...@apache.org> on 2007/07/26 16:28:40 UTC

[jira] Created: (HARMONY-4558) [classlib][awt] Buffered Image is not drawed when AlphaComposite is used

[classlib][awt] Buffered Image is not drawed when AlphaComposite is used
------------------------------------------------------------------------

                 Key: HARMONY-4558
                 URL: https://issues.apache.org/jira/browse/HARMONY-4558
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Dmitriy Matveev


Reproducer:

import java.awt.*;
import java.awt.image.BufferedImage;
import java.awt.event.*;

import javax.swing.JFrame;

public class AlphaCompositeTest {
    public static void main(String[] args) {
        final Font font = new Font("Dialog",Font.PLAIN, 12);

            JFrame f = new JFrame("Test"){
                public void paint(Graphics g){
                    Graphics2D g2d = (Graphics2D)g;
                    BufferedImage bi = new BufferedImage(500,500,BufferedImage.TYPE_INT_ARGB);
                    g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_ATOP));
                    Graphics2D g2 = bi.createGraphics();
                    g2.setFont(font);
                    g2.setColor(Color.red);
                    g2.drawString("Test", 50, 80);
                    g2d.drawImage(bi,0,0,null);
                }
            };
            
            f.setBounds(0, 0, 800, 600);
            f.setVisible(true);
            f.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent ev) {
                    System.exit(0);
                }
            });        
        }
    }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4558) [classlib][awt] Buffered Image is not drawn when AlphaComposite is used

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko resolved HARMONY-4558.
--------------------------------------

    Resolution: Fixed

The patch has been applied.
Please verify.

> [classlib][awt] Buffered Image is not drawn when AlphaComposite is used
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4558
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4558
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitriy Matveev
>            Assignee: Alexey Petrenko
>         Attachments: H-4558.patch
>
>
> Reproducer:
> import java.awt.*;
> import java.awt.image.BufferedImage;
> import java.awt.event.*;
> import javax.swing.JFrame;
> public class AlphaCompositeTest {
>     public static void main(String[] args) {
>         final Font font = new Font("Dialog",Font.PLAIN, 12);
>             JFrame f = new JFrame("Test"){
>                 public void paint(Graphics g){
>                     Graphics2D g2d = (Graphics2D)g;
>                     BufferedImage bi = new BufferedImage(500,500,BufferedImage.TYPE_INT_ARGB);
>                     g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_ATOP));
>                     Graphics2D g2 = bi.createGraphics();
>                     g2.setFont(font);
>                     g2.setColor(Color.red);
>                     g2.drawString("Test", 50, 80);
>                     g2d.drawImage(bi,0,0,null);
>                 }
>             };
>             
>             f.setBounds(0, 0, 800, 600);
>             f.setVisible(true);
>             f.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent ev) {
>                     System.exit(0);
>                 }
>             });        
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4558) [classlib][awt] Buffered Image is not drawn when AlphaComposite is used

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko updated HARMONY-4558:
-------------------------------------

    Patch Info: [Patch Available]

> [classlib][awt] Buffered Image is not drawn when AlphaComposite is used
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4558
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4558
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitriy Matveev
>            Assignee: Alexey Petrenko
>         Attachments: H-4558.patch
>
>
> Reproducer:
> import java.awt.*;
> import java.awt.image.BufferedImage;
> import java.awt.event.*;
> import javax.swing.JFrame;
> public class AlphaCompositeTest {
>     public static void main(String[] args) {
>         final Font font = new Font("Dialog",Font.PLAIN, 12);
>             JFrame f = new JFrame("Test"){
>                 public void paint(Graphics g){
>                     Graphics2D g2d = (Graphics2D)g;
>                     BufferedImage bi = new BufferedImage(500,500,BufferedImage.TYPE_INT_ARGB);
>                     g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_ATOP));
>                     Graphics2D g2 = bi.createGraphics();
>                     g2.setFont(font);
>                     g2.setColor(Color.red);
>                     g2.drawString("Test", 50, 80);
>                     g2d.drawImage(bi,0,0,null);
>                 }
>             };
>             
>             f.setBounds(0, 0, 800, 600);
>             f.setVisible(true);
>             f.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent ev) {
>                     System.exit(0);
>                 }
>             });        
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4558) [classlib][awt] Buffered Image is not drawn when AlphaComposite is used

Posted by "Igor V. Stolyarov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519913 ] 

Igor V. Stolyarov commented on HARMONY-4558:
--------------------------------------------

Works for me.
Thank you Alexey.

> [classlib][awt] Buffered Image is not drawn when AlphaComposite is used
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4558
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4558
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitriy Matveev
>            Assignee: Alexey Petrenko
>         Attachments: H-4558.patch
>
>
> Reproducer:
> import java.awt.*;
> import java.awt.image.BufferedImage;
> import java.awt.event.*;
> import javax.swing.JFrame;
> public class AlphaCompositeTest {
>     public static void main(String[] args) {
>         final Font font = new Font("Dialog",Font.PLAIN, 12);
>             JFrame f = new JFrame("Test"){
>                 public void paint(Graphics g){
>                     Graphics2D g2d = (Graphics2D)g;
>                     BufferedImage bi = new BufferedImage(500,500,BufferedImage.TYPE_INT_ARGB);
>                     g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_ATOP));
>                     Graphics2D g2 = bi.createGraphics();
>                     g2.setFont(font);
>                     g2.setColor(Color.red);
>                     g2.drawString("Test", 50, 80);
>                     g2d.drawImage(bi,0,0,null);
>                 }
>             };
>             
>             f.setBounds(0, 0, 800, 600);
>             f.setVisible(true);
>             f.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent ev) {
>                     System.exit(0);
>                 }
>             });        
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-4558) [classlib][awt] Buffered Image is not drawn when AlphaComposite is used

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko reassigned HARMONY-4558:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][awt] Buffered Image is not drawn when AlphaComposite is used
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4558
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4558
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitriy Matveev
>            Assignee: Alexey Petrenko
>         Attachments: H-4558.patch
>
>
> Reproducer:
> import java.awt.*;
> import java.awt.image.BufferedImage;
> import java.awt.event.*;
> import javax.swing.JFrame;
> public class AlphaCompositeTest {
>     public static void main(String[] args) {
>         final Font font = new Font("Dialog",Font.PLAIN, 12);
>             JFrame f = new JFrame("Test"){
>                 public void paint(Graphics g){
>                     Graphics2D g2d = (Graphics2D)g;
>                     BufferedImage bi = new BufferedImage(500,500,BufferedImage.TYPE_INT_ARGB);
>                     g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_ATOP));
>                     Graphics2D g2 = bi.createGraphics();
>                     g2.setFont(font);
>                     g2.setColor(Color.red);
>                     g2.drawString("Test", 50, 80);
>                     g2d.drawImage(bi,0,0,null);
>                 }
>             };
>             
>             f.setBounds(0, 0, 800, 600);
>             f.setVisible(true);
>             f.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent ev) {
>                     System.exit(0);
>                 }
>             });        
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4558) [classlib][awt] Buffered Image is not drawn when AlphaComposite is used

Posted by "Dmitriy Matveev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitriy Matveev updated HARMONY-4558:
-------------------------------------

    Summary: [classlib][awt] Buffered Image is not drawn when AlphaComposite is used  (was: [classlib][awt] Buffered Image is not drawed when AlphaComposite is used)

> [classlib][awt] Buffered Image is not drawn when AlphaComposite is used
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4558
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4558
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitriy Matveev
>
> Reproducer:
> import java.awt.*;
> import java.awt.image.BufferedImage;
> import java.awt.event.*;
> import javax.swing.JFrame;
> public class AlphaCompositeTest {
>     public static void main(String[] args) {
>         final Font font = new Font("Dialog",Font.PLAIN, 12);
>             JFrame f = new JFrame("Test"){
>                 public void paint(Graphics g){
>                     Graphics2D g2d = (Graphics2D)g;
>                     BufferedImage bi = new BufferedImage(500,500,BufferedImage.TYPE_INT_ARGB);
>                     g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_ATOP));
>                     Graphics2D g2 = bi.createGraphics();
>                     g2.setFont(font);
>                     g2.setColor(Color.red);
>                     g2.drawString("Test", 50, 80);
>                     g2d.drawImage(bi,0,0,null);
>                 }
>             };
>             
>             f.setBounds(0, 0, 800, 600);
>             f.setVisible(true);
>             f.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent ev) {
>                     System.exit(0);
>                 }
>             });        
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-4558) [classlib][awt] Buffered Image is not drawn when AlphaComposite is used

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko closed HARMONY-4558.
------------------------------------


> [classlib][awt] Buffered Image is not drawn when AlphaComposite is used
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4558
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4558
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitriy Matveev
>            Assignee: Alexey Petrenko
>         Attachments: H-4558.patch
>
>
> Reproducer:
> import java.awt.*;
> import java.awt.image.BufferedImage;
> import java.awt.event.*;
> import javax.swing.JFrame;
> public class AlphaCompositeTest {
>     public static void main(String[] args) {
>         final Font font = new Font("Dialog",Font.PLAIN, 12);
>             JFrame f = new JFrame("Test"){
>                 public void paint(Graphics g){
>                     Graphics2D g2d = (Graphics2D)g;
>                     BufferedImage bi = new BufferedImage(500,500,BufferedImage.TYPE_INT_ARGB);
>                     g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_ATOP));
>                     Graphics2D g2 = bi.createGraphics();
>                     g2.setFont(font);
>                     g2.setColor(Color.red);
>                     g2.drawString("Test", 50, 80);
>                     g2d.drawImage(bi,0,0,null);
>                 }
>             };
>             
>             f.setBounds(0, 0, 800, 600);
>             f.setVisible(true);
>             f.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent ev) {
>                     System.exit(0);
>                 }
>             });        
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4558) [classlib][awt] Buffered Image is not drawn when AlphaComposite is used

Posted by "Igor V. Stolyarov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor V. Stolyarov updated HARMONY-4558:
---------------------------------------

    Attachment: H-4558.patch

Attached patch contains implementation of absent AlphaComposite rules (DST_ATOP, DST_IN, DST_OUT and XOR) for for blitting on the GDISurface.

> [classlib][awt] Buffered Image is not drawn when AlphaComposite is used
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4558
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4558
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitriy Matveev
>         Attachments: H-4558.patch
>
>
> Reproducer:
> import java.awt.*;
> import java.awt.image.BufferedImage;
> import java.awt.event.*;
> import javax.swing.JFrame;
> public class AlphaCompositeTest {
>     public static void main(String[] args) {
>         final Font font = new Font("Dialog",Font.PLAIN, 12);
>             JFrame f = new JFrame("Test"){
>                 public void paint(Graphics g){
>                     Graphics2D g2d = (Graphics2D)g;
>                     BufferedImage bi = new BufferedImage(500,500,BufferedImage.TYPE_INT_ARGB);
>                     g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_ATOP));
>                     Graphics2D g2 = bi.createGraphics();
>                     g2.setFont(font);
>                     g2.setColor(Color.red);
>                     g2.drawString("Test", 50, 80);
>                     g2d.drawImage(bi,0,0,null);
>                 }
>             };
>             
>             f.setBounds(0, 0, 800, 600);
>             f.setVisible(true);
>             f.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent ev) {
>                     System.exit(0);
>                 }
>             });        
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.