RFR: JDK-8294680: Refactor scaled border rendering [v6]
Harshitha Onkar
honkar at openjdk.org
Fri Jan 13 20:13:23 UTC 2023
On Fri, 13 Jan 2023 19:35:23 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Harshitha Onkar has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits:
>>
>> - removed unused parameters, old stroke changes
>> - Merge branch 'master' into RefactorBorder_8294484
>> - moved strokeWidth logic to individual classes
>> - review changes
>> - Revert "test changes"
>>
>> This reverts commit abed51bd420941d8efa7b779b86257978f56810e.
>> - test changes
>> - minor changes
>> - Merge branch 'master' into RefactorBorder_8294484
>> - Merge branch 'master' into RefactorBorder_8294484
>> - review changes
>> - ... and 5 more: https://git.openjdk.org/jdk/compare/43847c43...9caca6b2
>
> src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java line 161:
>
>> 159: if (g instanceof Graphics2D) {
>> 160: Graphics2D g2d = (Graphics2D) g;
>> 161: g2d.setStroke(new BasicStroke((float) stkWidth));
>
> There's only one statement left inside the `if` block, shall get rid of another local variable?
>
> ((Graphics2D) g).setStroke(new BasicStroke((float) stkWidth));
@aivanov-jdk In case g isn't an instance of Graphic2d, a default value for strokeWidth is required outside of if block as it is used within `paintBorderShadow `& `paintBorderHighlight`.
-------------
PR: https://git.openjdk.org/jdk/pull/11571
More information about the client-libs-dev
mailing list