SetPixel is too slow. Is there a faster way to draw to bitmap?

前端 未结 5 457
生来不讨喜
生来不讨喜 2020-11-30 06:08

I have a small paint program that I am working on. I am using SetPixel on a bitmap to do that drawing of lines. When the brush size gets large, like 25 pixels across there i

5条回答
  •  隐瞒了意图╮
    2020-11-30 06:42

    SetPixel does this: is locks the whole image, sets the pixel and unlocks it

    try to do that: you acquire a lock for the whole memory image with lockbits, process you update and release the lock after.

    lockbits

提交回复
热议问题