From: "Joe C. Hecht" Subject: Re: LineTo is slow on fast machines Date: 20 Jan 1999 00:00:00 GMT Message-ID: <36A62D9A.970@gte.net> Content-Transfer-Encoding: 7bit References: <784faj$dji8@forums.borland.com> Content-Type: text/plain; charset=us-ascii Organization: Offshore Technology Mime-Version: 1.0 Reply-To: joehecht@gte.net Newsgroups: borland.public.delphi.graphics Its a driver/card issue. I can recommend some of "Joes best bets" for *accelerated* drawing: 1) Use a non VCL background bitmap buffer. ie: a raw (non TBitmap) memory dc. Use win api functions to blt the results to you paintbox. 2) If you are using *bunches* of Canvas.Moveto's and Canvas.Linetos, the VCL overhead of TCanvas can be significant over the same calls done using straight windows API functions. 3) Consider using the Windows PolyLine function instead of sperate calls to moveto and lineto. 4) Horizontal and vertical lines can often be drawn faster using the Windows API function PatBlt(). Hope that helps. Joe Dimitrios I. Koutsourelis wrote: > > My application draws on Form.PaintBox.Canvas a lot of lines (more than > 10000). It uses MoveTo - LineTo. On my desktop (Pentium MMX 233, 64MB, > VideoCard Mystiq with 2MB) it runs really fast and it is 3-4 times faster > than it used to be on DOS. > > However, it is really slow on many other fast computers (P-II 350, 64MB, and > DiamondViper with 8MB). It runs 5-6 times slower compared to my computer. > > Is it a configuaration problem, or what else ? -- Joe C. Hecht http://home1.gte.net/joehecht/index.htm