I'm writing an application that draws custom fractal images, so I'm currently creating an empty bitmap, drawing to that, and then drawing that on the screen using a form's OnPaint. This lets me do quick transformations like rotations and panning while still calculating the fractal. I want to update the bitmap while its on the screen, so the fractal updates itself even while you're panning or rotating.
Problem is, Visual Studio gets really angry (I don't remember the exact error) if I try to call SetPixel() while the bitmap is on the screen. How do I get around this? Is there another Image subclass I should use, or a buffer I need to clear? Java does this easily with the BufferedImage class. Is there a similar functionality in C#?
Thanks,
haven1433
Problem is, Visual Studio gets really angry (I don't remember the exact error) if I try to call SetPixel() while the bitmap is on the screen. How do I get around this? Is there another Image subclass I should use, or a buffer I need to clear? Java does this easily with the BufferedImage class. Is there a similar functionality in C#?
Thanks,
haven1433
Comment