Board index » delphi » Graphics - Non Flicker

Graphics - Non Flicker

Hi all

I'm very new to graphics programming and would like to find a nice tutorial
starting with moving images around with no flicker...

My first attempt was to move a TImage around with a timer just to see it
move... well, it flickered as you would probably imagine.

The next thing I tried was to paint an image using the draw method of a
canvas, moving the x and y 1 to 5 pixels each paint to emulate movement (of
course cleaning up the edges that were left behind). This too flickers when
I speed it up.

Can someone please help me to find the right way (a better way) of doing
this so that there is minimal to no flickering ?

Thanks to all

Scott

 

Re:Graphics - Non Flicker


Hi Scott, you could always have a TBitmap defined (the size of the output
window), write to it's canvas and then copy it to the output window.  This
means all drawing happens on the bitmap out of sight.

--
Paul Nicholls,
Live long and optimise.
--------------------------------
Web Page : www.southcom.com.au/~phantom
E-Mail        : phan...@southcom.com.au

Re:Graphics - Non Flicker


Or make a form doublebuffered (Form1.DoubleBuffered:=true). This does the
same thing in D4.

--
Sorry for terrible english.
Sergey Prilutsky.
mail: pser...@hotmail.com (please do not email files larger then 128Kb)
Moscow. Russia.

Re:Graphics - Non Flicker


If you want to move graphics in realtime with no flicker, than you can use
DirectX. Look at these url in the Delphi-Corner. There are Tutorials with
DelphiX.

Fuga

www.neobrothers.de

Scott Ritter <rit...@bblfm.com.au> schrieb in im Newsbeitrag:
7tgp6v$a...@forums.borland.com...

Quote
> Hi all

> I'm very new to graphics programming and would like to find a nice
tutorial
> starting with moving images around with no flicker...

> My first attempt was to move a TImage around with a timer just to see it
> move... well, it flickered as you would probably imagine.

> The next thing I tried was to paint an image using the draw method of a
> canvas, moving the x and y 1 to 5 pixels each paint to emulate movement
(of
> course cleaning up the edges that were left behind). This too flickers
when
> I speed it up.

> Can someone please help me to find the right way (a better way) of doing
> this so that there is minimal to no flickering ?

> Thanks to all

> Scott

Other Threads