Recent

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

AlexTP

  • Hero Member
  • *****
  • Posts: 1900
    • 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: 603
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 2.2.2 with FPC 3.2.2 (2022-05-15), Windows 10 — all 64-bit

Working on my own action/adventure game (similar to "The Legend of Zelda: ALttP") in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL2. Release expected in 2025 at the earliest.

 

TinyPortal © 2005-2018