Translate a point in this object waxLine to a text index relative to this object.
- Parameters
| pt | IN A point in Wax coordinate system. |
| selection | OUT A line designating the height of the selection. |
| charCount | OUT An optional return parameter returning the number of chars in this object. |
- Returns
- a real number which designates the index of the char hit and includes the fractional distance to the next character. designates how far into that char it hit, or one of the following values, as described below: kHitBefore, kHitToTheRight, kHitBelow
- Note
- that this works on characters, not glyphs. For characters that result in multiple glyphs, the group of glyphs is treated as a single glyph.
Additional information on return values: WaxRuns: If pt is above or to the left then the call returns kHitBefore. If pt is to the right then the call returns kHitToTheRight. If pt is below then the call returns kHitBelow. Otherwise the run is hit and the call returns the offset of the first glyph that is at or to the right of pt and pt is adjusted as follows: (the left of the glyph, selection bottom).
WaxLines: If pt is above or to the left then the call returns zero (0) and pt is adjusted to point to the first glyph on the line. If pt is below then the call returns kHitBelow as an indication to try the next line. If pt is within the bounds of the line, this call returns the offset of the closest glyph within the line and adjusts pt to point to the start of that glyph at the YPosition of the waxLine. If pt is within the bounds o the line, but to the right of the last glyph then this call returns the equivalent offset for the first glyph on the NEXT waxLine (if this would not be past the story thread boundry), adjusts pt to point to the end of the last glyph on the waxLine, and sets the endOfLine flag to kTrue.
Implements IWaxHitTest.