Re: [gtk-list] gdk_image_get/put_pixel : what does pixel content ...



On Mon, Mar 01, 1999 at 11:44:22PM +0000, Damon Chaplin wrote:
> Sven LUTHER wrote:
> > 
> > Hello, ...
> > 
> > gdk_image_put/get_pixel permit you to set or get pixels from an image.
> > 
> > the pixel argument is defined as a guint32, but what exactly does it represent
> > ? a colormap value, a 0 or 1, who is then written as a pixel of the color of
> > the current gc, or simply a rgb value ?
> 
> It's a pixel value, i.e. the pixel field in a GdkColor.

 ....
 
struct _GdkColor
{
  gulong  pixel;
  gushort red;
  gushort green;
  gushort blue;
};

but

guint32    gdk_image_get_pixel (GdkImage     *image,
	                gint          x,
	                gint          y);

is a guint32 the same as a gulong ?

is this a bug in gdk ?

what exactly is the content of a pixel value ?

how can you get the color of a pixel when you have the result of a
gdk_image_get_pixel ?

what exactly is the relationship between images, pixmaps and windows ? where
can i find info on this ? i would volunteer to fill some gdk entries in the
rdp, but first i would like to know more about it ? Should i look in some X
books for it ?

is there a better way to find the color of a pixel than getting the image from
a window and then getting the pixel from that image ?

> 
> Look at _gdk_pixmap_create_from_xpm() in gdk/gdkpixmap.c which uses
> gdk_image_put_pixel() to create pixmaps.
> 

I will have a look  ...

Friendly,

Sven LUTHER



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