chiark / gitweb /
wip, yellow is confusing
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 4 Mar 2019 14:08:28 +0000 (14:08 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Mon, 4 Mar 2019 14:08:28 +0000 (14:08 +0000)
cmyk.ps

diff --git a/cmyk.ps b/cmyk.ps
index c0e93820dea0d73182d0b51520bbe9b06cb4e4c1..cd7e0e4317ad5dfb36e15206048c25747290d36f 100644 (file)
--- a/cmyk.ps
+++ b/cmyk.ps
@@ -22,6 +22,9 @@
 /margix 2 def
 /margiy 2 def
 
+/margbx 10 def
+/margby 10 def
+
 % strid = stride
 
 /someyellow {
@@ -30,8 +33,8 @@
     /kmx    knx   1 sub   def
     /kmy    kny   1 sub   def
 
-    /stridox  szox  n  div  def
-    /stridoy  szoy  n  div  def
+    /stridox  gridox  n  div  def
+    /stridoy  gridoy  n  div  def
 
     /szix  stridox  margox sub  def
     /sziy  stridoy  margoy sub  def
     } for
     } for
 
-    0 setgray
-    /Helvetica findfont 18 scalefont setfont
-    0 0 moveto
-    (Y) show
-    yellow (___) cvs show
-
 } def
 
 /ranges {
     0 1 m {                    /yellow  exch def
         someyellow
 
+    0 setgray
+    /Helvetica findfont 18 scalefont setfont
+    0 0 moveto
+    (Y) show
+    yellow (___) cvs show
+
         showpage
     } for
 
 
 /m 16 def
 
-/knx 1 def
+/knx 2 def
 /kny 3 def
 
 /kbase 0 def
-/kfact 0.5 def
+/kfact 5 16 div def
+
+/gridox szox def
+/gridoy szoy def
 
 ranges
+
+/m 8 def
+/kbase 6 16 div def
+
+/gridox szox 2 div margbx sub def
+/gridoy szoy 2 div margby sub def
+
+0 1 3 {        /yellowpage exch def
+0 1 1 { /yellowx exch def
+0 1 1 { /yellowy exch def
+
+gsave
+ yellowx  gridox margbx add  mul
+ yellowy  gridoy margby add  mul
+ translate
+
+ /yellow
+ yellowpage 2 div
+ yellowx add  2 div
+ yellowy add  2 div
+ def
+
+ yellow pstack pop
+
+ someyellow
+
+grestore
+
+} for
+} for
+showpage
+} for
+