On Sat, 2002-04-20 at 12:38, Nuno Afonso wrote:
> 
> > that was right. its weird. it didnt show the message if i do the
> > showwidget after gdk_pixmap_new, without need to realize the widget, but
> > it still needs that i realize it if i pass -1 as depth.
> > why would that be?
> 
> GdkPixmap*  gdk_pixmap_new                  (GdkWindow *window,
>                                              gint width,
>                                              gint height,
>                                              gint depth);
> 
> Create a new pixmap with a given size and depth.
> 
> window : a GdkWindow, used to determine default values for the new
> pixmap. Can be NULL if depth is specified,
> width : The width of the new pixmap in pixels.
> height : The height of the new pixmap in pixels.
> depth : The depth (number of bits per pixel) of the new pixmap. If -1,
> and window is not NULL, the depth of the new pixmap will be equal to
> that of window.
> Returns : the GdkPixmap
> 
> http://www.gtk.org/api/
> 
> before you ask some questions you should at least try to give a look at
> the GTK+ Specification... as you see if you pass -1 the depth will be
> the same of the window.
> 

I always do that.
from the API

struct GdkPixmap
{
  gpointer user_data;
};

An opaque structure representing an offscreen drawable. Pointers to
structures of type GdkPixmap, GdkBitmap, and GdkWindow, can often be
used interchangeably. The type GdkDrawable refers generically to any of
these types.

>From GtkWidget.
no mention of a widnow argument element of the struct.
Must go to the include file to see that.

>From GdkWindow

a gpointer to userdata!

GdkPixmap, another way to name a GdkWindow!

However, there are some lot of functions you could have pointed me to
check. functions that works on GdkWindow only.

also from the API

(GdkDrawable)
Drawables, as the name suggests, are things which support drawing onto
them, and are either GdkWindow or GdkPixmap objects.
(GdkPixmap)
An opaque structure representing an offscreen drawable. Pointers to
structures of type GdkPixmap, GdkBitmap, and GdkWindow, can often be
used interchangeably. The type GdkDrawable refers generically to any of
these types.

No pointer as to what is the difference between a GdkWindow and a
GdkPixmap.
Since both are typdefed from the same source, i take it to be the same,
but since the API doesnt say it explicitly, i take it might change, and
would not be a wise thing to use GdkWindow functions on a GdkPixmap.
> > 
> > also, after gdk_pixbuf_get_from_drawable, a call to
> > gdk_pixbuf_get_bits_per_sample returns 8.
> > but to write a png with libpng i need to do like it was 3 bytes (i.e.
> > each row is 3 times the width) How should i interpret this?
> 
> I've never used Gtk+-2.0, so i've never worked with GdkPixbuf... i can't
> help you there.. :-(
> 

I have never heard GdkPixbuf is tied to Gtk+ 2. 

an "rpm -q --whatrequires gdk-pixbuf" gives:

librsvg-1.0.2-0_cvs_0
devhelp-0.3-1
gqview-1.1.0-1
gdk-pixbuf-devel-0.16.0-ximian.1
gqmpeg-0.13.0-1
ximian-doorman-1.0.8-ximian.4
gnome-applets-1.4.0.1-ximian.6
nautilus-1.0.6-ximian.4
bonobo-1.0.20-1.ximian.1
gnome-core-1.4.0.6-1.ximian.5

dont say "i have never used Gtk+-2.0...", instead just say "i dont
know", or "i have never used it" or "there is no need to use it, look at
the functions for GdkWindow, they can tell you about the depth of your
GdkPixmap" or something else.

Anyway, i guess what got you was that i just hit reply to the mail, and
it was sent to you alone and not to the list. sorry about that.

> Afonso
-- 
ICQ: 15605359 Bicho
                                  =^..^=
First, they ignore you. Then they laugh at you. Then they fight you.
Then you win. Mahatma Gandhi.
-------------------------------気検体の一致------------------------------------
暑さ寒さも彼岸まで。
恋にししょうなし。恋はしあんの他。
アン アン アン とっても大好き


_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to