Re: gdk_draw_layout isn't working for some widgets
- From: Sven Neumann <sven gimp org>
- To: Viraj Chatterjee <vchatter adobe com>
- Cc: gtk-app-devel-list gnome org, gtk-list gnome org
- Subject: Re: gdk_draw_layout isn't working for some widgets
- Date: 26 Aug 2004 16:43:12 +0200
Viraj Chatterjee <vchatter adobe com> writes:
I'm using gdk_draw_layout to draw certain text on some widgets in my
application, It works for most widgets, however, the text doesn't
render atall for a few widgets.
Here's a snippet of code I'm using:
PangoLayout *layout = gtk_widget_create_pango_layout(widget)
gdk_draw_layout(window, widget->style->fg_gc[state], x, y, layout);
This code snippet is run in an expose event handler? Otherwise it is
not surprising that it doesn't work since you must not draw outside an
expose event handler. If that is not the problem and you are drawing
from an expose event handler, does your code take widget->allocation.x
and widget->allocation.y into account?
In general, it would help to show a little more of your code if you
want us to help you.
] [Thread Prev