我有以下代码:
using System.Drawing;
...
Graphics _graphics = Graphics.FromImage(...)
...
public void Draw(Stream stream, Rectangle rect, Color color) {
_graphics.FillRectangle(new SolidBrush(Color), 0, 0, Width, Height);
_graphics.DrawImage(new Bitmap(stream), rect);
}
我应该使用 on 包围 drawImagenew Bitmap(...)
吗?同样的问题new SolidBrush(...)