| ||
|
This community works best when people use their real names. Please
register for a free account.
Other Groups: Joel on Software Business of Software Design of Software (CLOSED) .NET Questions (CLOSED) TechInterview.org CityDesk FogBugz Fog Creek Copilot The Old Forum Your hosts: Albert D. Kallal Li-Fan Chen Stephen Jones |
if I have a sketch with 130 points connected with short lines, it takes 10ms to draw it on a C# control on the Paint event. That's usually fine, but if I want to resize it with the mouse, and the mouse is moving fast, it starts looking ugly (basically, just blank temporarily). Worst comes to worst, I will just get rid of this "in flight repainting of resized sketch" feature. Nevertheless, before I do that - maybe there is some magical, easy to use API that I could use in my app that can do the same sort of painting that C# controls do, only 100 times faster?
oops, never mind, the ugly behavior was just a code bug, too much time wasted on outputting text to log. Turns out that 10ms repaint is in fact fine as far as maintaining the illusion of smooth resizing is concerned, even for fast mouse moves. To make it look truly ugly, I had to increase repaint time to 100ms using sleep(). Nevertheless, the larger question I think still stands. Having a sketch complex enough that would take 50ms and more to paint doesn't seem very far fetched. So probably a better API would still be nice. | |
Powered by FogBugz
