Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个使用DrawImage在图片框中绘制图像的程序。这个图像,一个球(.png 透明),每秒都会被另一个不同颜色的球覆盖。3-5 秒后,由于覆盖,球的边缘变坏了。
我尝试在任何覆盖之前使用FillRectangle清理背景,但我需要保留 Windows 窗体背景。我怎样才能做到这一点?
对于将来会遇到这种情况的任何人:
g.Clear(Color.FromArgb(0,0,0,0)); //Clear the graphics with transparent as background g.DrawImage(...); //Draw your image