Re: Info needed regarding gdk_pixbuf_get_depth
- From: Sven Neumann <sven gimp org>
- To: "Santhana Krishnan" <santhana krishnan wipro com>
- Cc: <gtk-list gnome org>
- Subject: Re: Info needed regarding gdk_pixbuf_get_depth
- Date: 30 Jul 2002 13:52:52 +0200
Hi,
"Santhana Krishnan" <santhana krishnan wipro com> writes:
> Is there any chance the depth of a drawable widget can be '0' ? In the
> following piece of code i am getting the depth value as zero for some
> widgets (eg. buttons, label..).
>
> if (GDK_IS_DRAWABLE (widget))
> {
> depth = gdk_pixbuf_get_depth (widget);
> }
>
> Any idea what could be the problem?.
there are several problems with this code. A widget is never a
GdkDrawable and if it was, your code would use a pixbuf method
on a widget. Something like this could work:
if (widget->window)
depth = gdk_drawable_get_depth (GDK_DRAWABLE (widget->window));
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]