From b614a6acc33d90603f74f7805d4406155894bf8c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 5 Mar 2019 17:16:52 +0000 Subject: [PATCH] seems to mostly work ? --- cmyk.ps | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/cmyk.ps b/cmyk.ps index 68b028e..6cee0a2 100644 --- a/cmyk.ps +++ b/cmyk.ps @@ -72,7 +72,7 @@ cyany neg gm add stridoy mul add } def -/cm_xy2val { +/cmy_xy2val { maxval gm div mul round cvi } def @@ -167,27 +167,32 @@ start_page /gridox szox def /gridoy szoy def -/text_ul { +/text_yellow { (Y) show yellowval (_) cvs show } def +/text_ul { text_yellow } def + /text_cyan { (C) show - cyany cm_xy2val (_) cvs show + cyany cmy_xy2val (_) cvs show } def /text_magenta { (M) show - magentax cm_xy2val (_) cvs show + magentax cmy_xy2val (_) cvs show + magentax gm ge { + (/) show + maxval (_) cvs show + } if } def /text_l { + 0 texty 0.25 mul translate cyany 0 le { - gsave - 0 texty rmoveto - (K) show - klist blacky get (_) cvs show - grestore + (K) show + klist blacky get (_) cvs show + 0 texty moveto } if blacky 0 le { text_cyan @@ -195,10 +200,6 @@ start_page } def /text_u { text_magenta - magentax gm ge { - (/) show - gm (_) cvs show - } if } def /ranges { @@ -214,21 +215,41 @@ start_page ranges /gm 4 def +/gn 5 def /knx 2 def /kny 1 def +/text_u { + yellowy 0 le { + magentax 0 le { + (K) show + klist blackx get (_) cvs show + ( ) show + } if + blackx 0 le { + text_magenta + } if + } if +} def +/text_ul { + text_yellow +} def +/text_l { + 0 texty 0.5 mul rmoveto text_cyan +} def + /ranges2 { - /gridoy szoy 5 div margby 4 mul sub def + /gridoy szoy margby 4 mul sub gn div def 0 1 gm { /yellowy exch def - /yellow yellowy maxval mul gm div def + /yellowval yellowy cmy_xy2val def /text_u_p yellowy 1 ge def gsave 0 - yellowy gridoy margby add mul + yellowy neg gm add gridoy margby add mul translate someyellow grestore -- 2.30.2