Skip to content

Commit a317bf6

Browse files
committed
Honour default_inkspread set in global context
1 parent 24fe3e7 commit a317bf6

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
XXXX-XX-XX
22

33
* The AusPost encoder now supports FCC 87 (Routing) and FCC 92 (Redirection) barcodes.
4+
* The renderers now support a `default_inkspread` global context setting.
45

56

67
2026-02-01

src/renlinear.ps.src

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ begin
9696
/barcolor (unset) def
9797
/backgroundcolor (unset) def
9898
/bordercolor (unset) def
99-
/inkspread 0.15 def
99+
/inkspread null def
100100
/width 0.0 def
101101
/barratio 1.0 def
102102
/spaceratio 1.0 def
@@ -123,8 +123,11 @@ begin
123123
barcolor (unset) eq { ctx /default_barcolor 2 copy known {get /barcolor exch def} {pop pop} ifelse } if
124124
backgroundcolor (unset) eq { ctx /default_backgroundcolor 2 copy known {get /backgroundcolor exch def} {pop pop} ifelse } if
125125
bordercolor (unset) eq { ctx /default_bordercolor 2 copy known {get /bordercolor exch def} {pop pop} ifelse } if
126+
inkspread null eq { ctx /default_inkspread 2 copy known {get /inkspread exch def} {pop pop} ifelse } if
126127
} { pop } ifelse
127128

129+
inkspread null eq {/inkspread 0.15 def} if
130+
128131
%
129132
% Input validation
130133
%

src/renmatrix.ps.src

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ begin
197197
{def} forall
198198
opt currentdict /opt undef //processoptions exec /options exch def
199199

200+
inkspread null eq {
201+
/uk.co.terryburton.bwipp.global_ctx dup where {
202+
exch get /default_inkspread 2 copy known {get /inkspread exch def} {pop pop} ifelse
203+
} {pop} ifelse
204+
} if
205+
200206
inkspread null eq {/inkspread 0.15 def} if
201207
inkspreadh null eq {/inkspreadh inkspread def} if
202208
inkspreadv null eq {/inkspreadv inkspread def} if

src/renmaximatrix.ps.src

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ begin
5151
/barcolor (unset) def
5252
/backgroundcolor (unset) def
5353
/bordercolor (unset) def
54-
/inkspread 0.15 def
54+
/inkspread null def
5555
/showborder false def
5656
/borderleft 0.0 def
5757
/borderright 0.0 def
@@ -67,8 +67,11 @@ begin
6767
barcolor (unset) eq { ctx /default_barcolor 2 copy known {get /barcolor exch def} {pop pop} ifelse } if
6868
backgroundcolor (unset) eq { ctx /default_backgroundcolor 2 copy known {get /backgroundcolor exch def} {pop pop} ifelse } if
6969
bordercolor (unset) eq { ctx /default_bordercolor 2 copy known {get /bordercolor exch def} {pop pop} ifelse } if
70+
inkspread null eq { ctx /default_inkspread 2 copy known {get /inkspread exch def} {pop pop} ifelse } if
7071
} { pop } ifelse
7172

73+
inkspread null eq {/inkspread 0.15 def} if
74+
7275
inkspread -1 lt inkspread 1 gt or {
7376
/bwipp.renmaximatrixBadInkspread (inkspread must be from -1 to 1) //raiseerror exec
7477
} if

0 commit comments

Comments
 (0)