Recent

Author Topic: [SOLVED] Canvas.Pixels seems very slow  (Read 2952 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
[SOLVED] Canvas.Pixels seems very slow
« on: August 12, 2020, 03:15:43 pm »
Del (I see my mistake in post)
« Last Edit: September 19, 2020, 01:51:44 pm by Alextp »

furious programming

  • Hero Member
  • *****
  • Posts: 853
Re: Canvas.Pixels[] setting seems very slow
« Reply #1 on: August 14, 2020, 12:31:02 am »
Even if you made a mistake, the Canvas.Pixels property is still very slow.

For quick access to pixels, it is much better to use ScanLine. Of course, in the case of image classes, because, for example, for a component canvas, this is not possible. Although nothing prevents you from using the back buffer as well.

After all, context is needed to say anything.
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

 

TinyPortal © 2005-2018