【问题标题】:Overwrite DrawImage in picturebox (VB.NET)在图片框中覆盖 DrawImage (VB.NET)
【发布时间】:2011-05-15 18:24:06
【问题描述】:

我有一个使用 DrawImagepicturebox 中绘制图像的程序。这个图像,一个球(.png 透明),每秒都会被另一个不同颜色的球覆盖。 3-5 秒后,由于覆盖,球的边缘变坏了。

我尝试在任何覆盖之前使用 FillRectangle 清理背景,但我需要保留 Windows 窗体背景。我该怎么做?

【问题讨论】:

    标签: vb.net drawimage


    【解决方案1】:

    致任何将来会遇到这种情况的人:

    g.Clear(Color.FromArgb(0,0,0,0)); //Clear the graphics with transparent as background
    g.DrawImage(...); //Draw your image
    

    【讨论】:

      猜你喜欢
      • 2012-11-21
      • 2016-10-10
      • 1970-01-01
      • 1970-01-01
      • 2020-12-31
      • 1970-01-01
      • 2011-12-06
      • 2012-10-11
      • 2014-06-27
      相关资源
      最近更新 更多