RFR: JDK-8015739: Background of JInternalFrame is located out of JInternalFrame [v9]
Sergey Bylokhov
serb at openjdk.org
Wed Oct 12 21:19:15 UTC 2022
On Fri, 7 Oct 2022 22:01:00 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java line 292:
>>
>>> 290: height = Region.clipRound(at.getScaleY() * h);
>>> 291: xtranslation = Region.clipRound(at.getScaleX() * x + at.getTranslateX());
>>> 292: ytranslation = Region.clipRound(at.getScaleY() * y + at.getTranslateY());
>>
>> This probably should be refactored to something like this:
>> https://github.com/openjdk/jdk/blob/ec4fb47b90c9737dfdc285ebe98367a221c90c79/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L375
>
> @mrserb Thank for the suggestion. Are you suggesting that same transformations be applied for width, height and additionally to x&y translations?
> https://github.com/openjdk/jdk/blob/ec4fb47b90c9737dfdc285ebe98367a221c90c79/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L373
The methods like Rigion.dimAdd/clipScale should be used everywhere the overflow is possible.
-------------
PR: https://git.openjdk.org/jdk/pull/10274
More information about the client-libs-dev
mailing list