You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Igor V. Stolyarov (JIRA)" <ji...@apache.org> on 2007/08/15 13:25:30 UTC
[jira] Commented: (HARMONY-4617) [classlib][awt] NPE while drawing
Images with rotation
[ https://issues.apache.org/jira/browse/HARMONY-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519932 ]
Igor V. Stolyarov commented on HARMONY-4617:
--------------------------------------------
Works for me.
Thank you Alexey.
> [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
> Assignee: Alexey Petrenko
> Attachments: H-4617-1.patch, 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.