Re: [gtkmm] problems with pango
- From: Morus Walter <morus walter gmx de>
- To: gtkmm-list gnome org
- Cc: daniel elstner gmx net, murrayc usa net
- Subject: Re: [gtkmm] problems with pango
- Date: Wed, 30 Oct 2002 19:21:09 +0100
Murray Cumming writes:
>
> That's the API docs for pango_shape(), not draw_glyphs(). You need this
> instead:
> http://developer.gnome.org/doc/API/2.0/gdk/gdk-drawing-primitives.html#gdk-draw-glyphs
>
> The drawable.hg file already contains a comment about this, so I see no
> need to keep that bug open.
>
Right. Sorry. Seems monday wasn't my day :-(.
The docu on draw_glyphs isn't that clear. It talkes about a sequence
of glyphs which is IMO exactly what one GlyphString is meant to be.
Note that it does not talk about a sequence of GlyphStrings.
So to be sure this requires further analysis:
I used the debugger to see which function is called to do the rendinging.
I find (in my case) a call to
pango_xft_picture_render
the glyphs parameter is just passed through to this function.
The docu for the right fuction is
http://developer.gnome.org/doc/API/2.0/pango/pango-xft-fonts-and-rendering.html#pango-xft-picture-render
and it clearly speaks of 'glyphs: the glyph string to draw'.
As a side note you might consider that using a pointer to struct isn't
an apropriate spec for an array of structs unless you either provide the
length of the array or have an end marker in the struct...
So my suggestion is to substitute the current
void draw_glyphs (const Glib::RefPtr<const GC>& gc,
const Glib::RefPtr<const Pango::Font>& font, int x, int y,
PangoGlyphString* glyphs)
by
void draw_glyphs (const Glib::RefPtr<const GC>& gc,
const Glib::RefPtr<const Pango::Font>& font, int x, int y,
Pango::GlyphString& glyphs) {
draw_glyphs (gc, font, x, y, glyphs->gobj());
}
Actually that is just what I'm currently doing. It might work by change
though.
As I said in my initial posting on this function: I would not mind
if you don't want to change it. So feel free to close the bug if you
don't like it.
hope I got this right this time,
Morus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]