java.lang.Object
io.sf.carte.echosvg.bridge.TextHit
Class that encapsulates information returned from hit testing a
 
TextSpanLayout instance.- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionTextHit(int charIndex, boolean leadingEdge) Constructs a TextHit with the specified values.
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the index of the character that has been hit.booleanReturns whether on not the character has been hit on its leading edge.
- 
Constructor Details- 
TextHitpublic TextHit(int charIndex, boolean leadingEdge) Constructs a TextHit with the specified values.- Parameters:
- charIndex- The index of the character that has been hit. In the case of bidirectional text this will be the logical character index not the visual index. The index is relative to whole text within the selected TextNode.
- leadingEdge- Indicates which side of the character has been hit.
 
 
- 
- 
Method Details- 
getCharIndexpublic int getCharIndex()Returns the index of the character that has been hit.- Returns:
- The character index.
 
- 
isLeadingEdgepublic boolean isLeadingEdge()Returns whether on not the character has been hit on its leading edge.- Returns:
- Whether on not the character has been hit on its leading edge.
 
 
-