次のコードがあります。
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 を使用して drawImage を囲む必要がありnew Bitmap(...)
ますか? に関する同じ質問new SolidBrush(...)