Gnomecanvas/TextItem question
- From: Chris Debenham - SSA Systems Engineer <Chris Debenham Sun Com>
- To: gtk-perl-list gnome org
- Subject: Gnomecanvas/TextItem question
- Date: Mon, 19 Jan 2004 13:23:00 +1100
I wrote a program in perl using gtk1 that is used at my church (and
others) for displaying the song lyrics on a projector during church.
The page is http://www.adebenham.com/lds/
I am moving to Gtk2 for it and have almost got everything working
(actually due to gtk2s' coolness I have added features :-) but I am
stuck on one item ... Finding the dimensions (in pixels) for a text item
that will be put on a gnomecanvas.
The reason for needing this is the app allows for adding bible verses
and it automatically figures out how many verse will fit on a single
screen and splits it accordingly.
Previously I did it by creating a Gtk::Gdk::Font with the font set
accordingly then used string_width to find wrapping and fudged a value
for string_height.
This doesn't seem to work anymore.
Basically, how do I find the height of a arbitrary string for a given
font and given maximum width?
Thanks,
Chris
BTW the page for my gtk2 version is http://www.adebenham.com/lds/lds2.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]