Re: [gtkmm] Drawing text to a drawable (gtkmm-1.3.20)
- From: Daniel <dss home se>
- To: murrayc usa net
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Drawing text to a drawable (gtkmm-1.3.20)
- Date: Sun, 18 Aug 2002 01:23:21 +0200
On 17 Aug 2002 18:41:26 +0100
Murray Cumming <murrayc usa net> wrote:
> 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
>
Yes, create-methods exists for the Pixmap and Bitmap but I can't find create-methods for Pango::Layout. In the Pango doc you can find the following function:
PangoLayout* pango_layout_new (PangoContext *context);
I can't find anything like this in the Gtkmm docs...
/Daniel
> > 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]