开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜