On Fri, 25 Oct 2024 14:08:40 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Andy Goryachev has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 14 additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/master' into ag.text.layout.api >> - Merge remote-tracking branch 'origin/master' into ag.text.layout.api >> - remove line spacing >> - tests >> - whitespace >> - caret info >> - text line info >> - Merge remote-tracking branch 'origin/master' into ag.text.layout.api >> - convert to wrapper >> - clarify >> - ... and 4 more: https://git.openjdk.org/jfx/compare/a1a11ef7...eb990081 > > modules/javafx.graphics/src/main/java/javafx/scene/text/CaretInfo.java line > 57: > >> 55: * @return the array of [x, ymin, ymax] values >> 56: */ >> 57: public abstract double[] getLineAt(int index); > > Have you considered returning a record for this? > > If you did that, it might be easier for apps to consume. It would also make > it easy for you to add a convenient `List<CaretInfo.Line> getLines()` method. well, we could have returned Line2D but we have no such public class! We have javafx.geometry.Rectangle2D but no corresponding Line2D. I could use Rectangle2D here, which might also take care of the vertical text support which `will have been added` in the year 252525. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1596#discussion_r1817257345