harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Khaschansky (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2032) [classlib][awt] Harmony clipping differs from RI by one pixel
Date Thu, 14 Dec 2006 10:23:23 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-2032?page=comments#action_12458414 ] 
            
Oleg Khaschansky commented on HARMONY-2032:
-------------------------------------------

MultiRectArea is a special case. I created a Shape with the same implementation as MultiRectArea
has but with the different class name (to avoid entering the MRA-specific code on instanceof
checks) and used it instead of MultiRectArea in the first test. And Harmony demonstrated the
same behavior as RI.

So, the reason is that MultiRectArea class is handled in a special way
in Harmony. It is not a bug then.

> [classlib][awt] Harmony clipping differs from RI by one pixel
> -------------------------------------------------------------
>
>                 Key: HARMONY-2032
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2032
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Alexey Petrenko
>         Attachments: HARMONY-2032-actual.PNG, HARMONY-2032-expected.PNG
>
>
> =========== Test ==========
> import java.awt.Color;
> import java.awt.Frame;
> import java.awt.Graphics;
> import java.awt.Panel;
> import java.awt.Rectangle;
> import org.apache.harmony.awt.gl.MultiRectArea;
> public class Test {
>     public static void main(String args[]) throws Exception {
>         Frame f = new Frame();
>         final Panel top = new Panel() {
>             public void paint(final Graphics g) {
>                 MultiRectArea mma = new MultiRectArea();
>                 mma.add(new Rectangle(10, 10, 2, 10));
>                 g.setClip(mma);
>                 g.setColor(Color.RED);
>                 g.drawRect(10, 10, 1, 10);
>             }
>         };
>         f.add(top);
>         f.setSize(200, 200);
>         f.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message