RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v17]

Andy Goryachev angorya at openjdk.org
Mon Mar 4 17:52:59 UTC 2024


On Mon, 4 Mar 2024 17:13:01 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 1044:
>> 
>>> 1042:     private int findFirstRunStart() {
>>> 1043:         int start = Integer.MAX_VALUE;
>>> 1044:         for (GlyphList r: getRuns()) {
>> 
>> the old code had a 0 check for getRuns.length, presumably to avoid the iterator creation.
>> the new code is probably fine, because most of the time we'll have the need for the iterator anyway.
>
> `getRuns` returns an array, it won't create an `Iterator`.

you are right!

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1323#discussion_r1511547919


More information about the openjfx-dev mailing list