Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: Known Java2D bug?



Thanks for your reply Michael, it's very much appreciated.

> The Java team at Apple is very small, and to succeed we are focussing
> all of our attention on the release of 1.4.1; we currently have no plans
> for rolling fixes we make in 1.4.1 backwards into 1.3.1. We simply do
> not have the staff to back-port these fixed.

I find it extremely odd that Apple don't invest more resources into Java
development, it sounds like you have a lot of work on your hands. This
problem with AffineTransforms sounds like bad news for us as our application
is for graphic design and includes lots of fundamental scaling and rotation.
Am I right in saying then, that there will be no further updates to 1.3.1
and that the current version on OS 10.2 will be the final release?

Alex.

----- Original Message -----
From: "Michael McDougall" <email@hidden>
To: "Alex Glover (Sigmer)" <email@hidden>
Sent: Wednesday, October 30, 2002 5:40 PM
Subject: Re: Fw: Known Java2D bug?


> I do not know, off the top of my head, of any defects that are specific
> to
> standard B&W G3's, but we have had many many reports of problems
> with our handling of AffineTransform's in 1.3.1
>
> A quick modification of the test case Mr Tran provides indicates that
> the problem DOES also occur for:
>
> drawImage(BufferedImage, AffineTransform, ImageObserver)
>
> See below:
>
> /
> ************************************************************************
> *****/
>
> import java.awt.Color;
> import java.awt.Graphics;
> import java.awt.Graphics2D;
> import java.awt.GridLayout;
> import java.awt.Insets;
> import java.awt.geom.AffineTransform;
> import java.awt.image.BufferedImage;
> import java.awt.image.RenderedImage;
> import javax.swing.JFrame;
> import javax.swing.JPanel;
>
> public class TestCase2 extends JFrame {
> static final int DIAMETER = 100;
> static AffineTransform identity = new AffineTransform();
> static BufferedImage img = null;
>
> static
> {
> img = new BufferedImage( DIAMETER, DIAMETER,
> BufferedImage.TYPE_INT_RGB);
> Graphics2D g = img.createGraphics();
> g.setBackground(Color.blue);
> g.setColor(Color.red);
> g.clearRect(0, 0, DIAMETER, DIAMETER);
> g.fillOval(0, 0, DIAMETER, DIAMETER);
> g.dispose();
> }
>
> class bad extends JPanel {
> public void paint(Graphics g)
> {
> Graphics2D g2 = (Graphics2D) g;
> g2.drawImage(img, identity, null);
> }
> }
>
> class fine extends JPanel {
> public void paint(Graphics g)
> {
> Graphics2D g2 = (Graphics2D) g;
> g2.drawImage(img, null, null);
> }
> }
>
> public TestCase2(String[] args) {
> super( "drawRenderedImage Test" );
> getContentPane().setLayout( new GridLayout( 2,4) );
> for (int i = 0; i < 4; i++) {
> getContentPane().add(new bad());
> getContentPane().add(new fine());
> }
>
> addNotify( );
> Insets ins = getInsets();
> setBounds( 0, 0, (DIAMETER *4) + (ins.right + ins.left),
> (DIAMETER *2) + (ins.top + ins.bottom));
> setVisible(true);
> }
>
> public static void main( String[] args ) {
> new TestCase2(args);
> }
> }
>
> /
> ************************************************************************
> *****/
>
>
> The Java team at Apple is very small, and to succeed we are focussing
> all of our attention on the release of 1.4.1; we currently have no
> plans
> for rolling fixes we make in 1.4.1 backwards into 1.3.1. We simply do
> not have the staff to back-port these fixed.
>
> As the testcase above indicates, if all you need is the identity
> transform,
> you can also work around this problem -- pass in a null transform and
> things work fine.
>
> Apple Java 1.4.1 Developer Preview 2 currently available to ADC
> developers, and we should be releasing a 1.4.1 DP4 very shortly. As
> I indicated to Mr Tran, the defect in question has been addressed in
> that release.
>
> The defect you refer to is fixed as well.
>
> Java2D is particularly tricky stuff to implement correctly, and in
> spite
> of our time crunch, I especially wanted to take the time to thank Mr
> Tran
> for his efforts in narrowing down this defect for us.
>
> It makes a huge difference when developers can provide small, focused
> test cases that indicate what we are doing wrong.
>
> Good luck with your application.
>
> Mikey McDougall
> Apple Java 1.4.1 Quality Lead
>
>
>
> On Tuesday, October 29, 2002, at 05:24 AM, Alex Glover (Sigmer) wrote:
>
> >
> > Hi,
> >
> > I'm a developer on the java-dev mailing list, I've been discussing a
> > particular bug with another developer with whom you have been in
> > contact
> > (below). The bug refers to drawRenderedImage on OS 10.2 (Java 1.3.1). I
> > would like to know if you have had reports of similar problems using
> > drawImage(BufferedImage, AffineTransform, ImageObserver)? We have had
> > a bug
> > report of iffy rendering by our application on OS 10.2 that we
> > originally
> > deployed on OS 10.1. Are there known issues with hardware acceleration
> > specifically with standard Blue and White G3's?
> >
> > Any insights you could offer would be much appreciated.
> >
> > Thanks, Alex.
> >
> >
> > ----- Original Message -----
> > From: "Chi Tran" <email@hidden>
> > To: <email@hidden>
> > Sent: Tuesday, October 29, 2002 12:49 PM
> > Subject: FW: Known Java2D bug?
> >
> >> -----Original Message-----
> >> From: Michael McDougall [mailto:email@hidden]
> >> Sent: Monday, October 28, 2002 6:35 PM
> >> To: Chi Tran
> >> Subject: Re: Known Java2D bug?
> >>
> >>
> >>>> I'm new to developing Java on OS X. An application we wrote using
> >>>> Java2D runs
> >>>> fine on the PC but behaves differently on OS 10.2. It seems like
> >>>> drawRenderedImage is not working correctly. Check out the following
> >>>> images and
> >>>> you'll see what I mean.
> >>>> http://zoysia.sesda.com/~ctran/MacFrames.jpg
> >>>> http://zoysia.sesda.com/~ctran/PCFrames.jpg
> >>>>
> >>>> Is this a known bug?
> >>
> >> A quick check shows that your test case works fine in Java 1.4.1
> >> Developer Preview 2.
> >> As a workaround for 1.3.1, as long as you are using the identity
> >> transform, you can
> >> call
> >>
> >> g2.drawRenderedImage(img, null);
> >>
> >> and your test case (slightly modified) works on both Windows and the
> >> Mac.
> >>
> >> Thanks for the great test case.
> >>
> >> Mikey McDougall
> >> Apple Java 1.4.1 Quality Lead
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.