[lazarus] How to draw pixels ?

Marc Weustink marc at dommelstein.net
Mon Oct 8 02:49:09 EDT 2001


At 08:51 08-10-01 +0200, Mattias Gaertner wrote:
>On Mon, 08 Oct 2001 00:48:10 +0200
>Marc Weustink <marc at dommelstein.net> wrote:
>
> > Pffff... It was to long ago that I did something with GTK drawing. From
> > what I remember there is a GTK/GDK finction to get the RGB values forn an
> > index.
> >
> > BTW how doe you set the pixel ?
>
>(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.

Marc






More information about the Lazarus mailing list