当前位置: 动力学知识库 > 问答 > 编程问答 >

C# Bad performance drawing image

问题描述:

When using normal FillEclipse function, my game has quite good fps. When I switch to using images I get terrible fps and the whole thing is laggy.

Here is my code, first I load the images (happens only once):

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

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

And I use them like this (which is called every paint event):

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

Am I doing something wrong?

分享给朋友:
您可能感兴趣的文章:
随机阅读: