x.origin
and y.origin
are the same
position you would pass to gdkDrawLayoutLine
. index.ranges
should contain ranges of bytes in the layout's text. The clip
region will include space to the left or right of the line (to the
layout bounding box) if you have indexes above or below the indexes
contained inside the line. This is to draw the selection all the way
to the side of the layout. However, the clip region is in line coordinates,
not layout coordinates.gdkPangoLayoutLineGetClipRegion(line, x.origin, index.ranges)
line
x.origin
index.ranges
GdkRegion
] a clip region containing the given ranges