[comp.windows.news] Novice NeWS user needs assistance

walters@COMMUNITY-CHEST.MITRE.ORG (06/05/88)

I have several questions concerning NeWS.  We are using the pNeWS 
release from Parallax on a Sun 3/160.

Documentation:

The documentation we received seems fairly sparse; it consists of a
manual of Parallax extensions to NeWS, as well as a NeWS manual.  I
have also purchased two Adobe books on Postscript, the Reference
manual and the cookbook.  I have made some effort to find the answers
to my questions in the manuals before attempting this posting.  What
other documentation is available (I also looked on the new-archive
server documentation index)?

Palettes:

How does NeWS (specifically pNeWS) handle color?  Can the default
palette be changed?  If so, how?

Saving Postscript Canvas as Rasterfile:

The demos that are provided show methods of loading rasterfiles and
painting on a canvas.  Is the reverse operation supported, i.e., are
postscript/NeWS primitives provided that save a canvas as a rasterfile?
 
Any suggestions, pointers, etc. would be greatly appreciated.  Thanks
in advance.

-- chris walters
   (walters@mitre.arpa)
   (703) 883-615

standard disclaimer...

glc@c3po.UUCP (Greg Cockroft) (06/10/88)

	I have several questions concerning NeWS.  We are using the pNeWS 
	release from Parallax on a Sun 3/160.
	
	Palettes:
	
	How does NeWS (specifically pNeWS) handle color?  Can the default
	palette be changed?  If so, how?

You can't change the colortables.  You ask for a color with PostScript, 
and the particular NeWS implementation gives you the best that it can do.

pNeWS uses the same color values as Sun NeWS, but in a different order.
This is to make programming of graphics over video transparent to
the programmer.  Mapping tables are created for the 32 hardware
available Graphics Over Video colors.  These tables convert a full color
RGB triple into a correct color index for the hardware.  Different tables
are used for converting Normal Graphics Canvases. 

If you really need to change the colormap on the 1280, you can use the
"kitchen sink command" *parallax*.  This is an added PostScript operator 
in pNeWS which allows you to send write/read directly to the board.
You will need a manual on the 1280 to get the hex codes for changing the
color table.
	
	Saving Postscript Canvas as Rasterfile:
	
	The demos that are provided show methods of loading rasterfiles and
	painting on a canvas.  Is the reverse operation supported, i.e., are
	postscript/NeWS primitives provided that save a canvas as a rasterfile?

Not until pNeWS 1.1 is released from Parallax.  It was demoed in February,
so I'm sure it will be along soon.

But if you are really desperate you can use the "kitchen sink command" to
do anything, including reading back bits from the board.


	-greg.