harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor V. Stolyarov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4617) [classlib][awt] NPE while drawing Images with rotation
Date Tue, 14 Aug 2007 12:51:31 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

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

    Patch Info: [Patch Available]

> [classlib][awt] NPE while drawing Images with rotation
> ------------------------------------------------------
>
>                 Key: HARMONY-4617
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4617
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Linux
>            Reporter: Igor V. Stolyarov
>         Attachments: H-4617.patch
>
>
> Here is simple reproducer:
> import java.awt.*; 
> import java.awt.geom.*; 
> import java.awt.image.BufferedImage; 
> import java.awt.event.*; 
> import java.lang.Math;
> import javax.swing.JFrame; 
> public class Test { 
>     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(100,100,BufferedImage.TYPE_INT_ARGB);

>                     Graphics2D g2 = bi.createGraphics(); 
>                     g2.setFont(font); 
>                     g2.setColor(Color.red); 
>                     g2.drawString("Test", 50, 80); 
>                     AffineTransform at = new AffineTransform();
>                     at.setToRotation(Math.PI/2, 100, 100);
>                     g2d.setTransform(at); 
>                     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); 
>                 } 
>             }); 
>         } 
>     } 
> Investigation of this issue shows - XSurface can't create Raster, because it receive
negative ROI coordinates.

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