You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Oliver Deakin (JIRA)" <ji...@apache.org> on 2007/10/31 15:47:50 UTC
[jira] Resolved: (HARMONY-5044) [classlib][awt] Drawing Images with
Affine Transformation on BufferedImage works incorrectly.
[ https://issues.apache.org/jira/browse/HARMONY-5044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Deakin resolved HARMONY-5044.
------------------------------------
Resolution: Fixed
Thanks Igor, patch applied at repo revision r590683 - please check it was applied correctly.
> [classlib][awt] Drawing Images with Affine Transformation on BufferedImage works incorrectly.
> ---------------------------------------------------------------------------------------------
>
> Key: HARMONY-5044
> URL: https://issues.apache.org/jira/browse/HARMONY-5044
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Igor V. Stolyarov
> Assignee: Oliver Deakin
> Attachments: H-5044.patch, Harmony.JPG, RI.JPG
>
>
> Drawing Images with Affine Transformation on BufferedImage works incorrectly
> Simple reproducer:
> import java.io.*;
> import java.awt.*;
> import java.awt.geom.*;
> import java.awt.image.*;
> import javax.swing.*;
> public class TransformTest extends JFrame {
> public BufferedImage im1, im2;
> public static void main(String[] args){
> TransformTest aTest = new TransformTest();
> aTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
> aTest.setSize(400, 300);
> aTest.setVisible(true);
> }
> public TransformTest(){
> im1 = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);
> im2 = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
> }
> public void paint(Graphics g){
> Graphics2D _g2d = im2.createGraphics();
> _g2d.setColor(new Color(255, 0, 0, 127));
> _g2d.fillRect(0, 0, 100, 100);
> Graphics2D g2d = im1.createGraphics();
> g2d.setColor(Color.white);
> g2d.fillRect(0, 0, 200, 200);
> AffineTransform at = new AffineTransform();
> at.setToRotation(Math.PI/4);
> g2d.setTransform(at);
> g2d.drawImage(im2, 50, 50, null);
> g.drawImage(im1, 30, 30, null);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.