Re: text string width and height in gtk2?



"Steven Usdansky" <usdanskys rocketmail com> writes:
I've got an app written using gtk-1.2 that I'm trying to upgrade to
gtk-2.0.  Looking through the gdk-2.0 API documentation, I see that
among the functions I need to upgrade are gdk_text_width() and
gdk_text_height().  The API doc states that these functions have
been deprecated, but give me no clue as to how I can replace their
functionality.  I tried reading through the gtk, gdk, and Pango
documentation, but just couldn't find what I need.  Could someone
please point me in the right direction?  Thanks


You probably want to look at the porting guide, which is linked from 
developer.gnome.org/dotplan

short answer is use PangoLayout and pango_layout_get_pixel_extents().

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]