Subject: Setting a background

From: [email-masked] (Dennis Heimbigner)
Date: Tue, 6 Oct 87 15:36:26 EST

I am trying to use readcanvas and imagecanvas to set up my
background image under NeWS.
I enter psh and type:

	framebuffer setcanvas
	(background) readcanvas imagecanvas

but it has no effect (it also doesn't generate any errors).

Can anyone tell me what I am doing wrong?
I am sure it is something obvious.
I believe that the file named 'background' is a sun raster file
since I can load it with screenload.

Dennis Heimbigner
([email-masked])

---

From: [email-masked] (Greg McLaughlin)
Date: Tue, 13 Oct 87 19:02:47 EST

Here is some code from my user.ps that does this very thing...

/ImagePaintRoot { % string => -
        gsave
                readcanvas
                framebuffer setcanvas clippath pathbbox scale pop pop
                imagecanvas
        grestore
        } def

/imagemenu [
    (founders)          { /PaintRoot
                                /ImagePaintRoot
                                {(NEWSHOME) getenv (/smi/founders.im8) append}
                                        {} modifyproc
                                store PaintRoot }
    (cartoon)           { /PaintRoot
                                /ImagePaintRoot {(Backgrounds/cartoon.im1) } {}
                                        modifyproc
                                store PaintRoot }

%	:
%	:
%	:
] makemenu def

Just add imagemenu to your main menu and select all the image backgrounds you
like.

This works best if the framebuffer is retained since readcanvas stops up the
works on you for a while.

Greg McLaughlin
Portable NeWS
Sun Microsystems Inc