Hi All,
I’m building a pixel editor, and the idea is that as you mouse-over the canvas it draws a pixel overlay using graphics.draw to indicate where you would fill in a pixel on mouse-down.
As soon as you move off one square pixel the overlay gets erased, and a new one is drawn under the mouse in the new position.
That works fine for smaller images, but for larger images I’m seeing some delay/lagginess which I think is due to constantly calling new Picture(width, height) each time the mouse moves into a new pixel’s area.
What I would prefer to do is just call Graphics.Delete(x, y, w, h) to remove anything drawn in that region. But it looks like that’s not an available function.
Am I just missing similar functionality under a different method, or is there no way to delete drawing done on a transparent background? (It must be transparent because the whole pixel editor is designed using layers, and the mouseover layer is superimposed on the underlying graphics).
Thanks!
-Mike
10 posts - 6 participants