RE: How to draw a text in widget?



But how to use gdk_draw_layout? I can't find an example to use this
function.

To use gdk_draw_layout, looks it need to create layout first, but create
layout need PangoContext, How to create PangoContext with a string?
Also, after finish draw, do I need to unref the PangoContext and
pangolayout?

Thanks.


-----Original Message-----
From: gtk-app-devel-list-admin gnome org
[mailto:gtk-app-devel-list-admin gnome org] On Behalf Of Filip Van
Raemdonck
Sent: Tuesday, September 23, 2003 6:25 AM
To: gtk-app-devel-list gnome org
Subject: Re: How to draw a text in widget?

On Mon, Sep 22, 2003 at 02:09:19PM -0400, Tom Liu wrote:

I still don't know how to clips the text. 

Set a clipping rectangle on your gc.

Also gdk_draw_string and gdk_font_unref are all deprecated.

Use Pango and gdk_draw_layout instead.


Regards,

Filip

-- 
        /* Amuse the user. */
              \|/ ____ \|/
              "@'/ ,. \`@"
              /_| \__/ |_\
                 \__U_/
        --
/usr/src/linux-2.4.2/arch/sparc/kernel/traps.c::die_if_kernel()
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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