[comp.windows.news] Freezing canvases

mh@wlbr.EATON.COM (Mike Hoegeman) (06/10/88)

In article <553@ecrcvax.UUCP> andy@ecrcvax.UUCP (Andrew Dwelly) writes:
>Is there any way of "freezing" a canvas so that output does not appear on the
>screen until the canvas is "unfrozen" ?. This is rather like the /Mapped field
>except that a frozen canvas does not vanish from the screen. 
>
>Why should I want such a facility ?. Well, it is often better to freeze a
>window before outputing a complex picture/diagram and then unfreeze it, so that
>the picture appears all at once. Watching a diagram form piece by piece on the
>screen seems to draw attention to the performance (or lack of it) of the NeWS
>server.

I don't think there's anything in NeWS akin to what you are asking for.
However you can accomplish  your goal by doing some sort of double buffering
scheme. One way to do this would be to do all your drawing on an unmapped canvas
and then use readcanvas  (or is it imagecanvas ? i always get the two confused)
to "blit" the unmapped canvas a the mapped canvas.

-mike

greg@gergle.UUCP (06/12/88)

>Is there any way of "freezing" a canvas so that output does not appear on the
>screen until the canvas is "unfrozen" ?. This is rather like the /Mapped field
>except that a frozen canvas does not vanish from the screen. 

>Why should I want such a facility ?. Well, it is often better to freeze a
>window before outputing a complex picture/diagram and then unfreeze it, so that
>the picture appears all at once. Watching a diagram form piece by piece on the
>screen seems to draw attention to the performance (or lack of it) of the NeWS
>server.

There is only one way I know of to achieve this affect in NeWS.

Create an unmapped canvas the same size as your ClientCanvas.
Always draw into this canvas.
When you want to update the display, imagecanvas from the unmapped canvas to
your ClientCanvas. Make sure that the scale is correctly set when you 
imagecanvas.  If should  be WidthOfClientCanvas HeightOfClientCanvas scale.


	-greg.