harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4741) [classlib][awt] Graphics XORMode drawing doesn't implemented
Date Mon, 10 Sep 2007 06:46:29 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526069
] 

Alexey Petrenko commented on HARMONY-4741:
------------------------------------------

Igor,

according to our compatibility guideline [1] we should follow the spec until we does not have
strong reasons to contradict the spec.
I do not see any reasons to do this now.

Do you have such reasons?

You also use GetPrimitiveArrayCritical in NativeImageBlitter_xor method. The JNI spec [2]
says that there should not be much time between GetPrimitiveArrayCritical and ReleasePrimitiveArrayCritical
calls but your method can take rather long period of time.
So I suggest to remove GetPrimitiveArrayCritical calls.

What do you think?

1. http://harmony.apache.org/subcomponents/classlibrary/compat.html
2. http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/functions.html#GetPrimitiveArrayCritical



> [classlib][awt] Graphics XORMode drawing doesn't implemented
> ------------------------------------------------------------
>
>                 Key: HARMONY-4741
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4741
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Igor V. Stolyarov
>            Assignee: Alexey Petrenko
>         Attachments: H-4741.patch, Harmony.JPG, RI.JPG
>
>
> Graphics XORMode drawing doesn't implemented
> Simple reproducer:
> import java.awt.*; 
> import java.awt.image.BufferedImage; 
> import java.awt.event.*; 
> import javax.swing.JFrame; 
> public class XORModeTest { 
>     public static void main(String[] args) { 
>         final Font font = new Font("Dialog",Font.PLAIN, 12); 
>         JFrame f = new JFrame("XORModeTest"){ 
>             public void paint(Graphics g){ 
>                 Graphics2D g2d = (Graphics2D)g; 
>                 BufferedImage bi = new BufferedImage(200,200,BufferedImage.TYPE_INT_ARGB);

>                 Graphics2D g2 = bi.createGraphics(); 
>                 g2.setFont(font); 
>                 g2.setColor(Color.green); 
>                 g2.fillRect(30, 30, 100, 100);
>                 g2.setColor(Color.red); 
>                 g2.drawString("Test", 50, 80); 
>                 g2d.setXORMode(Color.blue); 
>                 g2d.drawImage(bi,0,0,null); 
>             } 
>         }; 
>              
>         f.setBounds(0, 0, 300, 300); 
>         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.


Mime
View raw message