summaryrefslogtreecommitdiff
path: root/examples/colorcir.ps
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2013-07-23 16:24:19 +0100
committerChris Liddell <chris.liddell@artifex.com>2015-07-20 18:21:17 +0100
commit6948650efd3fb9e2a70b8cf16aca57e9d0b7eb0a (patch)
tree5c2a1c671c1d4521f8a770d1e69e3d4342718030 /examples/colorcir.ps
parent7fd9e0be26e67c36f87733bc89ea07dc26d9f839 (diff)
downloadghostpdl-6948650efd3fb9e2a70b8cf16aca57e9d0b7eb0a.tar.gz
Commit of build_consolidation branch
Squashed into one commit (see branch for details of the evolution of the branch). This brings gpcl6 and gxps into the Ghostscript build system, and a shared set of graphics library object files for all the interpreters. Also, brings the same configuration options to the pcl and xps products as we have for Ghostscript.
Diffstat (limited to 'examples/colorcir.ps')
-rw-r--r--examples/colorcir.ps125
1 files changed, 125 insertions, 0 deletions
diff --git a/examples/colorcir.ps b/examples/colorcir.ps
new file mode 100644
index 000000000..78cca0267
--- /dev/null
+++ b/examples/colorcir.ps
@@ -0,0 +1,125 @@
+%!
+/colorcirsave save def % prevent left over effects
+
+gsave
+/Times-Roman findfont 24 scalefont setfont
+72 72 translate 0 0 moveto 1 0 0 setrgbcolor (Red) show
+72 0 translate 0 0 moveto 0 1 0 setrgbcolor (Green) show
+72 0 translate 0 0 moveto 0 0 1 setrgbcolor (Blue) show
+72 0 translate 0 0 moveto 1 1 0 setrgbcolor (Yellow) show
+72 0 translate 0 0 moveto 1 0 1 setrgbcolor (Pink) show
+72 0 translate 0 0 moveto 0 1 1 setrgbcolor (Cyan) show
+72 0 translate 0 0 moveto 0.9 0.9 0.9 setrgbcolor ('White') show
+grestore
+
+0.0 setlinewidth
+
+/length 0.1 def
+/width 0.02 def
+/hsvcircle {
+gsave
+ /h 0.0 def
+ 0 4 360 {
+ pop
+ gsave
+ 0.5 0.0 translate
+
+ newpath
+ 0.0 0.0 moveto
+ length 0.0 lineto
+ length width lineto
+ 0.0 width lineto
+ closepath
+ h 1.0 1.0 sethsbcolor
+ fill
+
+ %newpath
+ %0.0 0.0 moveto
+ %length 0.0 lineto
+ %length width lineto
+ %0.0 width lineto
+ %closepath
+ %0.0 setgray
+ %stroke
+
+ grestore
+ /h h 4 360 div add def
+ 4 rotate
+ } for
+grestore
+} def
+
+/graycircle {
+gsave
+ /h -1.0 def
+ 0 4 360 {
+ pop
+ gsave
+ 0.5 0.0 translate
+
+ newpath
+ 0.0 0.0 moveto
+ length 0.0 lineto
+ length width lineto
+ 0.0 width lineto
+ closepath
+
+ h abs setgray
+ fill
+
+ %newpath
+ %0.0 0.0 moveto
+ %length 0.0 lineto
+ %length width lineto
+ %0.0 width lineto
+ %closepath
+ %0.0 setgray
+ %stroke
+ grestore
+
+ /h h 8 360 div add def
+ 4 rotate
+ } for
+grestore
+} def
+
+0.0 setlinewidth
+0.0 setgray
+300 400 translate
+500 500 scale
+
+30 rotate
+1.0 0.7 scale
+-30 rotate
+
+hsvcircle
+0.8 0.8 scale
+graycircle
+0.8 0.8 scale
+hsvcircle
+0.8 0.8 scale
+graycircle
+0.8 0.8 scale
+hsvcircle
+0.8 0.8 scale
+graycircle
+0.8 0.8 scale
+hsvcircle
+0.8 0.8 scale
+graycircle
+0.8 0.8 scale
+hsvcircle
+0.8 0.8 scale
+graycircle
+0.8 0.8 scale
+hsvcircle
+0.8 0.8 scale
+graycircle
+0.8 0.8 scale
+hsvcircle
+0.8 0.8 scale
+graycircle
+
+showpage
+clear cleardictstack
+colorcirsave restore