Theres a book called the black art of 3d games development ( I think), it
has lots of algorithms for working out which ares change, so you may only
need to copy smaller sections of you bitmap, it might help
ie rather then draw the whole, just redraw whats changed and then I beleive
you can jut force a paint for an area with invalidate, but you may have to
check that .
"Chris Crowe" <[EMAIL PROTECTED]> on 27/05/99 06:16:07 am
Please respond to [EMAIL PROTECTED]
To: Multiple recipients of list Delphi <[EMAIL PROTECTED]>
cc: (bcc: Richard R Huegill/NSO/CSDA)
Subject: [DUG]: Drawing Speed
I am writing a custom scheduling control, which does a lot of drawing to
the screen.
Do stop flicker I have created a bitmap the size of the client area of the
control. I then draw the interface to the bitmap, and then I draw the
bitmap to the screen using Canvas.Draw(0,0, MyBitmap);
I found this accetable when the control is small, but if it is say getting
up to around 800 * 600 it takes a fair amount of time to draw. I have a
timing component which states it takes 0.091 seconds on average to draw the
image at the large screen size. You might say that it is quite fast. I
suppose it is. But the control must support selecting of rows and scrolling
of the window, much like a listbox.
It is very much designed around the outlook/schedule plus style of their
day view for their scheduling.
Is there a faster way of drawing to the screen?, I have to draw to the
bitmap becuase if I do not the screen flickers rather badly.
Outlook draws very fast, and I assume my routines are quite optimized but
obviosly not enough. So is there a better way, am I better to use BitBlt to
draw to the screen than the Canvas.Draw()?
Any other speed increasing tips would be greatly appreciated...
ps: Does anyone know of a profiler that will profile a component, instead
of the application?
Chris
Christopher Crowe (Software Developer)
Microsoft MVP, MCP
Adrock Software
Byte Computer & Software LTD
P.O Box 13-155
Christchurch
New Zealand
Phone/Fax (NZ) 03-3651-112
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz