>Hi Sergio,
>
>I'm glad to know it worked !
Hi Cesar,
Your tip worked like a charm, but (speed) effect I wanted to achieve
did not happen;
I tought at first that drawing on ImageCanvas is what causes 'delays'
in showing drawings, so using tip you provided me here I diverted my drawing directly to form surface hoping that my drawings will show up instantly.
(Impression I had when I forst tried drawing directly to it)
Well it might be a strange way to realise speed of ImageCanvas, but this is how I come to it <g> .
I realised that there is not much (if any) speed difference between the two! (ImageCanvas = Fast!)
So, It is NOT ImageCanvas but sheer quantity of my own drawings that causes 'delay'.
Now 'delay' is quet understandable ;
To draw full page there could be 300-400 strings
to write across canvas, 20-30 lines, or rect. pics etc.
This way 'Overfilled' canvas can take close to 2 seconds to surface it all.
Since I am doing drawings via my own drawing class which (wrapped/automated GdiPlusX sample drawings made to be generic)
everytime I draw string class method would I create new font ;
.
loFont = .font.New(loFontFamily,nFontSize , .FontStyle.Regular, .GraphicsUnit.pixel )
.
The same goes for pens, paths, rectangles, graphics etc.
Since class methods are generic they would create new pen, new rectangle
etc. everytime they are called.
Now what I am interested is is there any way to optimize performance
here by preserving let say font object for consecutive strings, or pens, or brushes, or colors etc.
(Or simply by *not* doing something that causes performance decay)
Would it make any diff to drawing speed if I sort string drawing sequences
by top or left position. (Draw By row or by column) ?
In my case, majority of renderings are as a matter of fact strings so this area for sure needs optimising (if possible) first.
Any speed improvement hints are greatly appreciated :)
TIA
Sergio