[lazarus] How to draw pixels ?

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Oct 8 03:46:44 EDT 2001


On Mon, 08 Oct 2001 09:16:50 +0200
Marc Weustink <marc at dommelstein.net> wrote:

> >(see TGtkObject.SetPixel in gtkobject.inc)
> >With gdk_image_put_pixel. The TColor is converted to a TGDKColor via 
> >gdk_colormap_alloc_color with gdk_colormap_get_system as the colormap.
> 
> Ok, then yot get a GDKColor fron the get_pixel.
> 
>  From the description of the GDKColormap structure itself, I think you can 
> lookup the index in this map. I only don't know if the SystemMAp is a 
> pseudo colormap, but we can find out.

I think you are right. gdk_image_get_pixel returns a index in the colormap (gdk_colormap_get_system). But this index can also be a pseudo color (Direct Color or True Color). How can we find out?


I committed some new code for TColorDialog. The selected color can now be set.

Mattias






More information about the Lazarus mailing list