Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 3 - Word Processing Views / Word Processing View Reference
Protos / protoTXView


CharToPoint

protoTXView:CharToPoint(offset)

Returns a frame that specifies the coordinates of a character in a word-processing view.

offset
The offset from the beginning of the text in the word-processing view. This offset specifies the caret location: a value of 0 indicates before the first character, and a value of 1 indicates between the first and second characters.

return value
The *CharToPoint method returns a frame with three slots:

x The horizontal coordinate of the top-left corner of the rectangle enclosing the character at offset.

y The vertical coordinate of the top-left corner of the rectangle enclosing the character at offset.

lineHeight The line height of the line that contains the character.

DISCUSSION

The value of each of the slots in the returned frame is in global coordinates, relative to the top-left of the screen. This means that the y-value can be negative if the view has been scrolled down.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help