Re: Retrieving RGB from pixel values.
- From: Havoc Pennington <hp redhat com>
- To: Ian King <king eiffel com>
- Cc: gtk-list gnome org
- Subject: Re: Retrieving RGB from pixel values.
- Date: 16 Jul 2001 21:11:28 -0400
Ian King <king eiffel com> writes:
> With gtk+ 1.2, if my visual is a GDK_TRUE_COLOR_VISUAL, what is the easiest
> way to retrieve rgb values from a certain pixel value.
>
Probably:
image = gdk_image_get(drawable, x, y, 1, 1);
pixel = gdk_image_get_pixel (image, 0, 0);
gdk_colormap_query_color (colormap, pixel, &color);
Colormap must actually be the colormap for drawable.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]