RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v20]
Phil Race
prr at openjdk.java.net
Fri Jun 3 20:04:45 UTC 2022
On Fri, 3 Jun 2022 18:51:40 GMT, Alisen Chung <achung at openjdk.org> wrote:
>> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping
>
> Alisen Chung has updated the pull request incrementally with two additional commits since the last revision:
>
> - don't reset transform if it contains a non-scale transformation
> - updated test
src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java line 163:
> 161: at = g2d.getTransform();
> 162: oldStk = g2d.getStroke();
> 163: if((at.getType() & AffineTransform.TYPE_MASK_SCALE) != 0) {
if((at.getType() & AffineTransform.TYPE_MASK_SCALE) != 0)
getType() returns a mask of set bits.
You don't want to check that SCALE is set, you want to check that ROTATION and TRANSLATE are NOT set.
Something like
if (at.getType() & ~(TYPE_MASK_TRANSLATION | TYPE_MASK_ROTATION) == 0)) {
-------------
PR: https://git.openjdk.java.net/jdk/pull/7449
More information about the client-libs-dev
mailing list