Re: [gtkmm] Drawing text to a drawable (gtkmm-1.3.20)



On Sat, 2002-08-17 at 17:52, Daniel wrote:
> Hello!
> 
> I had to draw some text to a Gdk::Drawable and i have some questions:
> 
> 1) Which is "the right way" to draw text on a drawingarea. The Gtk+ doc tells me that I should use a PangoLayout... In Gtkmm i cannot find a Pango::layout ctor. How am i supposed to create this Pango::Layout?

You need to use create(). Please see
http://www.gtkmm.org/gtkmm2/tutorial/html/ch16s02.html
 
> 2) Gdk::Drawable::draw_glyphs(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Pango::Font>& font, int x, int y, PangoGlyphString* glyphs)
> 
> Perhaps the last parameter should be a Pango::GlyphString? 

The header file has this comment:
//glyphs seems to be an array, and this function will be used so little
that it doesn't seem worth wrapping it to use a container of
Pango::GlyphString.

Feel free to provide a patch, but the GTK+ docs suggest that you don't
need to use it anyway:
http://developer.gnome.org/doc/API/2.0/gdk/gdk-drawing-primitives.html#gdk-draw-glyphs

I guess we need to merge the GTK+ docs into the gdkmm and pangomm docs.
  
-- 
Murray Cumming
murrayc usa net
www.murrayc.com




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