Instruction set reference
HIPE_OP_RANGE_GEOMETRY
Sent by the display server in response to a HIPE_OP_GET_RANGE_GEOMETRY instruction.
- location: The element the request was made for.
- arg[0]: The rectangles, one for each line the range covers, separated by semicolons. Each rectangle is four comma-separated numbers: x,y,width,height. For example: 0,3,63,26;0,36,125,26.
Notes
Coordinates are in CSS pixels, relative to the top-left corner of the element (its border edge) as it is currently displayed. If the element, or anything containing it, is scrolled, the rectangles move with the text: they describe where the text appears, not where it would be if nothing were scrolled.
Text on the same line forms a single rectangle, even when it spans several elements or font sizes. Each rectangle covers the text itself, not the full height of the line. Lines within the range that contain no text, such as empty lines, have no rectangle.
For a cursor position, there is a single rectangle with a width of 0, as tall as the line the cursor is on.
arg[0] is empty if there is nothing to report: the element isn't displayed, the range covers no text, or the request was for the element's cursor and the cursor isn't in the element.
