chiark / gitweb /
cmky seems good
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 5 Mar 2019 17:45:28 +0000 (17:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 5 Mar 2019 17:45:28 +0000 (17:45 +0000)
cmyk.ps

diff --git a/cmyk.ps b/cmyk.ps
index 18d23fa5f987b55c9c07c7656bcb72f5df032b47..5bfbcb315ec0113f64d7558f082de12a214357f5 100644 (file)
--- a/cmyk.ps
+++ b/cmyk.ps
 %          horiz M     } M-C-K grid
 %            vert' C   } M-C-K grid
 
-% OLD
-%   16^3 x    0 .. 3       1 Y per page
-%    8^3 x    4 .. 7       4 Y per page      8 = 0 2 4 6 8 10 12 15
-%             8 10 13 15
-
 /debug false def
-/debug true def
+%/debug true def
 
 /paperx 595 def
 /papery 842 def
 
 % o = outer, i = inner, f = final
 
-/margox 5 def
-/margoy 5 def
+/margox 2 def
+/margoy 2 def
 
 /margix 2 def
 /margiy 2 def
 
-/margbx 10 def
-/margby 10 def
+/margby 2 def
 
 % strid = stride
 
@@ -78,7 +72,7 @@
 } def 
 
 /cmy_xy2val {
-    maxval gm div mul round cvi
+    maxval gm div  mul  round cvi
 } def
 
 /someyellow {
         szfy setlinewidth
         kentry_x kentry_y translate
 
-               cyany           gn div
-                 magentax      gn div
-                 yellowval     gn div
+               cyany           gm div
+                 magentax      gm div
+                 yellowval     maxval div
                 klist_get maxval div
  { 4 copy } ifdebug
 
@@ -257,10 +251,11 @@ ranges
     } if
 } def
 /text_ul {
-    text_yellow
 } def
 /text_l {
-    0 texty 0.5 mul rmoveto text_cyan
+    0 texty 0.5 mul translate
+    cyany 0 le { 0 texty moveto text_yellow } if
+    0 0 moveto text_cyan
 } def
 
 /ranges2 {