[OpenJDK 2D-Dev] RFR 8144938: Handle properly coordinate overflow in Marlin Renderer

Jim Graham james.graham at oracle.com
Fri Mar 11 20:20:04 UTC 2016


Hi Laurent,

On 3/11/16 9:06 AM, Laurent Bourgès wrote:
>> Since this change will solve the issue for fills and uniform-scaled draws(), it handles the 90% case, but if you use a non-uniform scale of more than 2x, then it will still allow overflow in the final rendered path if a coordinate is near UPPER_BND...
>
> I wonder if such case is not only theorethical, as a typical canvas is
> integer based ie MAX_INTEGER << MAX_FLOAT.

Then the opposite might happen.  A path with coordinates > MAX_FLOAT/2 
could be scaled down to be a reasonable size on the BufferedImage, but 
we'd have chopped out a lot of its geometry before it gets to the 
transform and comes back into range.

Again, that would only happen in the case of a stroke with a non-uniform 
transform, though...

			...jim



More information about the 2d-dev mailing list