shfill trouble
The PostScript program below draws 13 vertical bars with smooth shading (shfill).
The rendering works as expected. On top of each bar are 2 numbers. For the first
of these bars, #0, the text by Showtext is correct. The other 12 bars don't show
numbers, but as tested by Illustrator, the paths exist, but they are not filled.
If shfill is blocked (% shfill) then all numbers are rendered correctly.
What might be wrong?
http://docs-hoffmann.de/swatch22112002.pdf
A final result is shown on p.18 here, but it was achieved by using an extra procedure
for the numbers.
Best regards --Gernot Hoffmann
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 1191 842
%%Creator: Gernot Hoffmann
%%Title: K-Bars Smooth shades
%%CreationDate: June 19 2019
/mm {2.834646 mul} def
/tx1 [(1.0 ) (1.1 ) (1.2 ) (1.3 ) (1.4 ) (1.5 ) (1.6 )
(1.7 ) (1.8 ) (1.9 ) (2.0 ) (2.1 ) (2.2 )] def
/tx2 [(1.000) (0.909) (0.833) (0.769) (0.714) (0.667) (0.625)
(0.588) (0.555) (0.526) (0.500) (0.476) (0.455)] def
/xa 20 mm def % Reference left
/ye 270 mm def % Reference top
/ya 16 mm def
/bx 20 mm def % Width
/by ye ya sub def % Height
/sx 23 mm def % Distance of boxes
/fo 12 def % Font size
/Showtext {moveto show} def
/Bars
{/Helvetica findfont fo scalefont setfont
0 0 0 1 setcmykcolor
/x0 xa def
/y0 ya def
/y1 ye def
/y2 y1 6 mm add def
0 1 12
{/k exch def
/ig tx2 k get cvr def
/x1 x0 bx add def
/x2 x0 9.5 mm add def
<<
/ShadingType 2
/ColorSpace /DeviceCMYK
/Coords [x0 y0 x0 y1]
/BBox [x0 y0 x1 y1]
/Function
<<
/FunctionType 2
/Domain [0 1] % for t
/C0 [0 0 0 1] % t=0 black
/C1 [0 0 0 0] % t=1 white
/N ig % C=C0+(C1-C0)t^N
>>
>>
shfill
tx1 k get x0 y2 Showtext
tx2 k get x2 y2 Showtext
/x0 x0 sx add def
} for
} def
Bars
showpage
