Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Jim Graham
More to the point, if you substitute a 0x0 clip when an incoming clip is an empty rectangle then it will always be empty under any kind of transform. This could be done by performing a "max(w,0);max(h,0);" operation on the incoming data. Once a clip is accepted as non-empty, then I think the

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Sergey Bylokhov
20.12.2012 13:49, Jim Graham wrote: More to the point, if you substitute a 0x0 clip when an incoming clip is an empty rectangle then it will always be empty under any kind of transform. This could be done by performing a "max(w,0);max(h,0);" operation on the incoming data. Once a clip is acce

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Sergey Bylokhov
20.12.2012 14:12, Sergey Bylokhov wrote: 20.12.2012 13:49, Jim Graham wrote: More to the point, if you substitute a 0x0 clip when an incoming clip is an empty rectangle then it will always be empty under any kind of transform. This could be done by performing a "max(w,0);max(h,0);" operation

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Sergey Bylokhov
20.12.2012 14:12, Sergey Bylokhov пишет: 20.12.2012 13:49, Jim Graham wrote: More to the point, if you substitute a 0x0 clip when an incoming clip is an empty rectangle then it will always be empty under any kind of transform. This could be done by performing a "max(w,0);max(h,0);" operation

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Jim Graham
Hi Sergey, Avoiding the transform only works if they read it back in the same coordinate system that they set it. It will fail if they do: setClip or clip(...); scale(5, 5); getClip(); The answer from getClip in that case should be scaled down by 5x. Going through d

[OpenJDK 2D-Dev] hg: jdk8/2d/jdk: 7180359: Assertion in awt_Win32GraphicsDevice.cpp when running specjbb in jprt

2012-12-20 Thread jennifer . godinez
Changeset: a988c23b8553 Author:jgodinez Date: 2012-12-20 14:43 -0800 URL: http://hg.openjdk.java.net/jdk8/2d/jdk/rev/a988c23b8553 7180359: Assertion in awt_Win32GraphicsDevice.cpp when running specjbb in jprt Reviewed-by: bae, prr ! src/windows/native/sun/windows/awt_Debug.cpp

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Sergey Bylokhov
Hi, Jim. 21.12.2012 1:42, Jim Graham wrote: Hi Sergey, Avoiding the transform only works if they read it back in the same coordinate system that they set it. It will fail if they do: setClip or clip(...); scale(5, 5); getClip(); So, given that we have to deal with the transform/

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Sergey Bylokhov
21.12.2012 3:26, Sergey Bylokhov пишет: Hi, Jim. 21.12.2012 1:42, Jim Graham wrote: Hi Sergey, Avoiding the transform only works if they read it back in the same coordinate system that they set it. It will fail if they do: setClip or clip(...); scale(5, 5); getClip(); So, given

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Jim Graham
Hi Sergey, The getClip methods don't claim to return the exact same shape that the user handed in - it just has to cover the territory covered by the clip. x,y,-N,-M covers the same territory as x,y,0,0 so it would be fine to substitute that value in its place. It is arguable whether it matt

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Sergey Bylokhov
Hi, Jim. 21.12.2012 3:54, Jim Graham wrote: Hi Sergey, The getClip methods don't claim to return the exact same shape that the user handed in - it just has to cover the territory covered by the clip. x,y,-N,-M covers the same territory as x,y,0,0 so it would be fine to substitute that value

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Jim Graham
Hi Sergey, On 12/20/2012 4:42 PM, Sergey Bylokhov wrote: Hi, Jim. 21.12.2012 3:54, Jim Graham wrote: Hi Sergey, The getClip methods don't claim to return the exact same shape that the user handed in - it just has to cover the territory covered by the clip. x,y,-N,-M covers the same territory

Re: [OpenJDK 2D-Dev] [8] Request for review: 8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

2012-12-20 Thread Sergey Bylokhov
Hi, Jim. 21.12.2012 4:59, Jim Graham wrote: The Object.equals() method is not intended to compare geometries. While Area.equals() attempts to perform geometric comparison I think that was a bad idea in retrospect for many reasons: - In practice you can only really compare within a tolerance du