[lazarus] How to draw pixels ?

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Oct 7 03:10:09 EDT 2001


On Fri, 05 Oct 2001 20:21:25 -0400
"Luis R. Hilario" <l_hilario at yahoo.com> wrote:

> Mattias Gaertner wrote:
> > 
> > On Wed, 3 Oct 2001 11:53:01 -0400
> > Inpromptu <inpromptu at operamail.com> wrote:
> > 
> > > How to draw pixels ?
> > 
> > Just the same like lines, circles and boxes. Any component with a canvas can be drawn onto:
> > 
> > Canvas.Pixels[x,y] := clRed;
> > 
> > But these pixels are not stored. You must draw them in every OnPaint event of the component, which can be pretty slow.
> > 
> 
> But we must remember that it does not work.
> Or already functions?

Sorry, you are right, there was a bug. I fixed the SetPixel.
But I don't know how to fix the GetPixel, because I don't know how to convert the result of gdk_image_get_pixel to TColor. Can anyone give me a hint?


I also fixed the TCustomForm.OnResize event and some smaller bugs.


Mattias






More information about the Lazarus mailing list