getting extents of individual words in a layout
- From: Theo Veenker <Theo Veenker let uu nl>
- To: gtk-i18n-list gnome org
- Subject: getting extents of individual words in a layout
- Date: Tue, 19 Feb 2008 22:33:53 +0100
Hi,
I need to know the extents of the individual 'words' in a layout
object (for an eye-tracking experiment). I want to draw a rectangle
around each word (in cairo) and also output the extents of each
word numerically.
Using an PangoLayoutIter I can walk over the layout lines and see
each character/grapheme but I how do I relate the current iterator
position to an index in the text? I need that in order to be able
to detect spacing characters between the words.
I also toyed with pango_layout_get_lines_readonly() and worked down
to the actual glyphitems but that seems rather tedious.
What would be the proper way to approach this?
Thanks,
Theo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]