Paint background only once
I have a drawing graph on a panel. The drawing has 2 components: "background" Grid and "foreground" graph. The user can move the graph lines, but the background remains static (for a select开发者_开发技巧ed time interval).
Re-drawing the background is a little expensive. Is there a way to keep the background "intact" and redraw the "foreground" graph only when moving the graph lines?
You could draw the background on a bitmap (acting as a buffer), and then just 'draw' the image every time.
精彩评论