I have the following code:
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);
}
Should I surround the drawImage with using on new Bitmap(...)
?
Same question on the new SolidBrush(...)