C#糟糕的性能绘图图像

时间:2014-05-19 11:43:15

标签: c# image winforms performance drawing

当使用普通的FillEclipse功能时,我的游戏有很好的fps。当我切换到使用图像时,我得到了可怕的fps,整个事情都是滞后的。

这是我的代码,首先我加载图片(只发生一次):

private Bitmap PlanetMe = new Bitmap("PlanetMe.png");
private Bitmap PlanetNeutral = new Bitmap("PlanetNeutral.png");

我像这样使用它们(这称为每个绘画事件):

g.DrawImage(image, this.x - this.radius, this.y - this.radius, this.radius * 2, this.radius * 2);

我做错了吗?

0 个答案:

没有答案