Re: Performance & new Pen() / new Brush()
- From: James Westgate <nospam@xxxxxxxxxxxxx>
- Date: Fri, 16 Jun 2006 10:31:58 +0100
We tend to use a singleton and cache pens and brushes that are frequently used there. Havent seen any problems.
There should also be some predefined system pens and brushes you can use.
James
http://www.crainiate.net
Lloyd Dupont wrote:
In my drawing code I recusrively create an average number of pens and brushes of, let's guess: 300?.
Would I see performance improvment by just caching those?
(actually I use and create all of them in a using() statment)
- References:
- Performance & new Pen() / new Brush()
- From: Lloyd Dupont
- Performance & new Pen() / new Brush()
- Prev by Date: Re: Performance & new Pen() / new Brush()
- Next by Date: GDI+ bitmap saving question
- Previous by thread: Re: Performance & new Pen() / new Brush()
- Next by thread: How to capture image from WebBrowser control?
- Index(es):