Re: How to get a GtkWidget in to pixbuf
- From: Alexander Larsson <alexl redhat com>
- To: sampo nurmentaus movial fi
- Cc: gtk-devel-list gnome org
- Subject: Re: How to get a GtkWidget in to pixbuf
- Date: Fri, 28 Apr 2006 09:49:37 +0200
On Fri, 2006-04-28 at 09:50 +0300, sampo nurmentaus movial fi wrote:
> >should work as you want. The use of allocation for coordinates is in
> >case the widget has not got a window of it's own (in that case
> >widget->window points to its parent widgets window).
>
> But please not that if your widget has any child widgets
> with windows of their own, this won't work. If this
> is the case, you'll have to use the root window as argument
> to gdk_pixbuf_get_from_drawable.
>
> Both Kalle's solution and the rootwindow thing has the
> limitation that the widget must be visible on the screen.
That won't work if the window is partially offscreen or obscured.
I have a patch in http://bugzilla.gnome.org/show_bug.cgi?id=318807
which adds a way to do this in all cases (gtk_widget_get_snapshot()).
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a globe-trotting devious assassin with acid for blood. She's a man-hating
mutant fairy princess who can talk to animals. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]