RFR: 8341670: [Text, TextFlow] Public API for Text Layout Info [v27]

Andy Goryachev angorya at openjdk.org
Thu May 22 19:09:00 UTC 2025


On Thu, 22 May 2025 17:59:40 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 1123:
>> 
>>> 1121:      * @since 25
>>> 1122:      */
>>> 1123:     public final PathElement[] getStrikeThroughShape(int start, int end) {
>> 
>> I just noticed that this is named `getStrikeThroughShape` rather than `strikeThroughShape`. The latter would match the similar `rangeShape`, `caretShape`, and `underlineShape` methods. We had discussed that you might propose to fix [JDK-8341438](https://bugs.openjdk.org/browse/JDK-8341438) by deprecating `rangeShape` and `underlineShape` and adding new `getRangeShape` and `getUnderlineShape` methods (although that might be problematic given the `caretShape` property, which necessarily already has a no-arg `getCaretShape()` method).
>> 
>> Did you name this method `getStrikeThroughShape` with the intention that it would have the fixed semantics of applying the insets from its inception? If so, then I recommend documenting that fact in this method.
>
> We discussed this with @kevinrushforth - I am going to remove the `getStrikeThroughShape()` method from Text/TextFlow in this PR, and add it under either a separate ticket, or as a part of https://bugs.openjdk.org/browse/JDK-8341438

Created https://bugs.openjdk.org/browse/JDK-8357594 for `Text::strikeThroughShape` and `TextFlow::getStrikeThroughShape`.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1596#discussion_r2103231779


More information about the openjfx-dev mailing list