Bitmap b;
Graphics.FromImage(b).Clear(Color.Red);
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Herfried K. Wagner [MVP]" wrote:
> "Jon Harrop" <(E-Mail Removed)> schrieb:
> > How do I clear a bitmap to a single color, or draw a rectangle into a
> > bitmap
> > to clear it? Do I have to iterate over the pixels myself?
>
> Check out the 'Graphics' class, especially its 'FromImage' and
> 'FillRectangle' methods.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
>
>