Re[2]: Object IO, fast window redraw

Peter Achten peter88@cs.kun.nl
Tue, 23 May 2000 09:44:02 -0700


Dear Valery,

At 20:03 22-5-00 +0400, you wrote:
>Hello Peter, and clean-list
>
>Dear Peter thank you very much for extremely quick answer.
>
>Tuesday, May 23, 2000, 4:23:04 AM, you wrote:
>
>PA> * use drawPoint instead of drawPointAt (the latter restores pen position,
>PA> the first advances the pen position one pixel to the right)
>
>done.
>
>PA> * if you draw a number of points in one colour in one row/column it is
>PA> faster to draw a line. Again, drawLine is faster than drawLineAt because
>PA> the latter restores pen position).
>
>not a my case :(
>
>PA> * minimise switching pen/back colour
>
>I can not becouse I draw a modified bitmap from real world and every pixel
>has its own colour.
>I also minimized setPenSize calls. but...
>
>PA> Hope this helps,
>
>I see no acceleration :(
>
>the main delay as I guess stands for update window procedure in/after
>every drawPoint call.

As I observed in my reply, much depends on the actual algorithm. I am not 
sure what you mean with your last remark:

>the main delay as I guess stands for update window procedure in/after
>every drawPoint call.

drawPoint, as any StdPicture function, does nothing more than performing 
the specified task. The *Picture environment is a specialised sub 
environment in which drawing occurs. This environment must be retrieved 
from the super environment (either PSt or IOSt). This is a rather costly 
action. I don't know if you're doing this per pixel, but if you do then I 
suggest to minimise this as well.

Greetings,
Peter