Summary
Adding TextFlow.underlineShape() to add support for a spellchecker-like decoration, mirroring a similar method in Text with the same signature.
Problem
Underline shape in TextFlow is needed to enable spellchecker decoration (squiggly line) under text region that might span multiple Text segments.
Solution
Add a new method, TextFlow.underlineShape(int, int).
Specification
/modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java
+ /**
+ * Returns the shape for the underline in local coordinates.
+ *
+ * @param start the beginning character index for the range
+ * @param end the end character index (non-inclusive) for the range
+ * @return an array of {@code PathElement} which can be used to create a {@code Shape}
+ * @since 21
+ */
+ public final PathElement[] underlineShape(int start, int end) {
- csr of
-
JDK-8307363 TextFlow.underlineShape()
- Resolved