Darc Posted November 25, 2003 Posted November 25, 2003 I just was wondering a few things about the speed of and how to speed up GDI+. First, which is faster, drawing to a Form or a PictureBox (provided double buffering is enabled)? and second, should you do Draw(Control.CreateGraphics) or Control.Refresh() for triggering the paint? Thanx for any help. Quote
bri189a Posted November 25, 2003 Posted November 25, 2003 Refresh it, creating graphics will lose the double buffering from my tests so far, example: in a module on form load I set g (a Grapics object) by doing the this.CreateGraphics()... I also set double buffering and all of that. In my form paint anything I draw is truely buffered (when drawn with e.Graphics, whereas anything I draw with the g object isn't double buffered. That's my opinion. Quote
XeroCode Posted November 26, 2003 Posted November 26, 2003 If you are creating a web based application and speed is a major issue (Which normally it is) the current installment of GDI does NOT take advantage of any hardware acceleration, if my memory serves me correctly. You may want to look into a DirectX component as far as speed is concerned Quote
Darc Posted November 26, 2003 Author Posted November 26, 2003 I know DirectDraw, and this is for Windows Apps I just don't like distributing apps that need around 200 megs to run when they're like school projects. Quote
*Experts* Bucky Posted November 26, 2003 *Experts* Posted November 26, 2003 Using Control.Invalidate() is much faster than using Control.Refresh() for triggering the painting. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
*Experts* Nerseus Posted November 26, 2003 *Experts* Posted November 26, 2003 Or, move your painting logic to a function (instead of in the event) and call the function if you determine you need to paint. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.