Drawing Speed of CopyTo.... Routines

Problem I am using SDL version 5.5. My question is in regard to the RChart component. I am bulding 20 different RChart's which I then need to output as bitmaps. I have tried using CopyToBMP and CopyToClipboard but both seem to be rather slow in rendering the bitmaps. I am running on a dual PIII with 1Gig of memory.
Solution The speed of rendering depends on the type of graphics card, the drawing elements (e.g. "MarkAt" elements are slower than "DrawToU elements), the number of elements in the chart, whether the result is a file or a memory structure, and on the size of the chart. To write a bitmap to a file takes most time (so CopyToBMP is by far the slowest routine).

I wrote a small test application which measures the time required to perform the various "CopyTo...." procedures - here are the results for a 1600 MHz Athlon with a NVidia Riva TNT 2/64 graphics card:

  Drawing on the canvas: 22.83 msec
           CopyToBitMap: 25.14 msec
              CopyToBMP: 287.8 msec
        CopyToClipBoard: 35.15 msec
              CopyToWMF: 12.62 msec

Attached to this mail please find the test application - I would be interested in the numbers of your computer.

 


Last Update: 2006-01-13