Board index » delphi » Scanline for Canvas ?

Scanline for Canvas ?

Hi all!
How to draw direct to canvas (like TBitmap.scanline[])? Canvas.pixels is
too slow.
Thanks.
 

Re:Scanline for Canvas ?


Hi all!
How to draw direct to canvas (like TBitmap.scanline[])? Canvas.pixels is
too slow.
Thanks.

Re:Scanline for Canvas ?


Quote
On Fri, 15 Oct 1999 15:22:22 +0400, colonel <colon...@chat.ru> wrote:
>How to draw direct to canvas (like TBitmap.scanline[])? Canvas.pixels is
>too slow.

1) Create a bitmap of the appropriate size.

2) Copy the contents of the canvas to the bitmap's canvas, using
CopyRect.

3) Manipulate the bitmap bits using Scanline.

4) Copy the bitmap back to the original canvas using Draw or CopyRect.

-Steve

Re:Scanline for Canvas ?


to speed things up
Var
 DC :Thandle;
Beign
 Dc := Canvas.Handle;

 Now do all of your Canvas drawing using the API setPixel...
windows.SetPixel(Dc, X,Y, ????) ec....
--
 if that isn't fast enough then you need to use OpenGL/DirectX

Quote
colonel wrote:
> Hi all!
> How to draw direct to canvas (like TBitmap.scanline[])? Canvas.pixels is
> too slow.
> Thanks.

Other Threads