Forum > Graphics

The Lazarus TImage.Canvas is too slow

<< < (3/3)

marcov:
search for lockwindowupdate()

440bx:
From the Windows API, I'd use either Polyline or PolyPolyline, that would allow multiple curves to be drawn in a single call which should speed things up considerably compared to LineTo and MoveTo combinations.

HTH.

circular:
Indeed. In the loop you compute twice each coordinates. Instead you can put them into an array (you know the size from the start) and then feed it into a Polyline call.

TRon:
In addition to what is already said: if you know the resolution beforehand then you  can even use pixels, and skip using lines. That combined with double buffering and a pre-calculated sine tab is afaik the fastest way to do it.

Navigation

[0] Message Index

[*] Previous page

Go to full version