/*
 * Copyright (C) 1990-1991 by Adobe Systems Incorporated.
 * All rights reserved.
 *
 * Permission to use, copy, modify, and distribute this software and its
 * documentation for any purpose and without fee is hereby granted,
 * provided that the above copyright notices appear in all copies and that
 * both those copyright notices and this permission notice appear in
 * supporting documentation and that the name of Adobe Systems
 * Incorporated not be used in advertising or publicity pertaining to
 * distribution of the software without specific, written prior
 * permission.
 * 
 * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
 * ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
 * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 * IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND
 * NON-INFRINGEMENT OF THIRD PARTY RIGHTS.  IN NO EVENT SHALL ADOBE BE LIABLE
 * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
 * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
 * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  ADOBE WILL NOT
 * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
 * 
 * PostScript, Display PostScript, and Adobe are trademarks of Adobe Systems
 * Incorporated registered in the U.S.A. and other countries.
 *
 * Author: Adobe Systems Incorporated
 */

defineps PSWDrawSquare(float fore_red, fore_green, fore_blue,
		       back_gray, scale_factor, rotate_factor)
	gsave
	back_gray setgray
	-1000 -1000 2000 2000 rectfill
	
	fore_red fore_green fore_blue setrgbcolor
	scale_factor scale_factor scale
	rotate_factor rotate
	-36 -36 72 72 rectfill
	grestore
endps	

defineps PSWDrawCurve(float fore_red, fore_green, fore_blue,
		      back_gray, scale_factor, rotate_factor, x1, x2)
	gsave
	back_gray setgray
	-1000 -1000 2000 2000 rectfill
	
	fore_red fore_green fore_blue setrgbcolor
	scale_factor scale_factor scale
	rotate_factor rotate

	newpath
	-36 -36 moveto
	x1 50 x2 36 36 -36 curveto
	closepath
	gsave fill grestore
	2 setlinewidth
	0 setgray stroke
	grestore
endps	

defineps PSWDrawText(float fore_red, fore_green, fore_blue,
		     back_gray, scale_factor, rotate_factor)
	gsave
	back_gray setgray
	-1000 -1000 2000 2000 rectfill
	
	fore_red fore_green fore_blue setrgbcolor
	scale_factor scale_factor scale
	rotate_factor rotate

	/Times-Roman 36 selectfont
	-40 8 moveto
	(Hello) show
	-48 -27 moveto
	(World) show
	grestore
endps	

defineps PSWDrawImage(float fore_red, fore_green, fore_blue,
		      back_gray, scale_factor, rotate_factor)
	gsave

	back_gray setgray
	-1000 -1000 2000 2000 rectfill
	
	scale_factor scale_factor scale
	rotate_factor rotate

	{fore_red mul} {fore_green mul} {fore_blue mul} {} setcolortransfer
	doimage
	grestore
endps	
