用 Clear 方法可以轻松地给 Graphics 对象设置背景色。

using (Bitmap bmp = new Bitmap(width, height))
{
    using (Graphics graphics = Graphics.FromImage(bmp))
    {
        graphics.Clear(Color.White);

当然这是在还没有绘图之前就要设置。

相关文章:

  • 2022-12-23
  • 2021-09-12
  • 2021-07-06
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
猜你喜欢
  • 2022-01-08
  • 2021-11-17
  • 2021-07-02
  • 2021-12-22
  • 2021-08-11
  • 2021-12-25
  • 2022-02-14
相关资源
相似解决方案