Re: drawing string metrics



Slava Bizyayev wrote:

Hi everyone,

I need to measure the pixel size of the dynamically generated string
that I'm going to draw with the currently selected (at runtime) font.

Sorry, I fail to recall the gtk/gdk function that could provide me with
the appropriate estimations. Any clue would be highly appreciated.

Hello
In case of GTK2 you can do it with pango_layout_get_pixel_extents()
http://developer.gnome.org/doc/API/2.0/pango/pango-Layout-Objects.html#pango-layout-get-pixel-extents

   Olexiy




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