Recent

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

AlexTP

  • Hero Member
  • *****
  • Posts: 2713
    • 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 »

flowCRANE

  • Hero Member
  • *****
  • Posts: 986
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 4.6 with FPC 3.2.2, Windows 11 — all 64-bit

Working solo on a top-down retro-style action/adventure game (pixel art), programming the engine from scratch, using Free Pascal and SDL3.

 

TinyPortal © 2005-2018