PC Review


Reply
Thread Tools Rate Thread

Clearing bitmaps

 
 
Jon Harrop
Guest
Posts: n/a
 
      24th Jan 2007

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?

--
Dr Jon D Harrop, Flying Frog Consultancy
Objective CAML for Scientists
http://www.ffconsultancy.com/product...ex.html?usenet
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      24th Jan 2007
"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/>

 
Reply With Quote
 
=?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
Guest
Posts: n/a
 
      25th Jan 2007
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/>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Bitmaps Peter Duniho Microsoft C# .NET 8 29th Nov 2009 10:02 PM
Clearing cells without clearing formulas marsjune68 Microsoft Excel Misc 2 10th Apr 2009 07:39 PM
DLL,MFC,Bitmaps Hilton Microsoft Dot NET Compact Framework 1 21st Jan 2008 03:51 PM
bitmaps Martin Microsoft Access 0 11th Feb 2004 09:02 AM
BITMAPS ELI WAGONER Microsoft Excel Misc 3 3rd Oct 2003 11:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:41 PM.