Skip to content

Commit a7dbf13

Browse files
committed
Avoid passing through physspec and propspec to 2D components
1 parent ff1764b commit a7dbf13

12 files changed

Lines changed: 77 additions & 26 deletions

src/databarexpandedcomposite.ps.src

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ begin
118118
/ai //gs1process exec pop pop pop
119119

120120
%
121-
% Plot the linear part
121+
% Generate metrics for the linear part
122122
%
123123
/uk.co.terryburton.bwipp._dontdraw true def
124124
linear options //databarexpanded exec
@@ -156,7 +156,11 @@ begin
156156
69 98 bot length 13 sub {} for
157157
] {sepfinder} forall
158158

159-
options (physspec) undef options (propspec) undef
159+
%
160+
% Generate metrics for the 2D part
161+
%
162+
options (physspec) undef
163+
options (propspec) undef
160164
comp options //gs1-cc exec /compsym exch def
161165
/ccpixs compsym /pixs get def
162166
/ccrowmult compsym /rowmult get def

src/databarexpandedstackedcomposite.ps.src

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ begin
121121
/ai //gs1process exec pop pop pop
122122

123123
%
124-
% Plot the linear part
124+
% Generate metrics for the linear part
125125
%
126126
/uk.co.terryburton.bwipp._dontdraw true def
127127
linear options //databarexpandedstacked exec
@@ -158,7 +158,11 @@ begin
158158
70 98 bot length 13 sub {} for
159159
] {sepfinder} forall
160160

161-
options (physspec) undef options (propspec) undef
161+
%
162+
% Generate metrics for the 2D part
163+
%
164+
options (physspec) undef
165+
options (propspec) undef
162166
comp options //gs1-cc exec /compsym exch def
163167
/ccpixs compsym /pixs get def
164168
/ccrowmult compsym /rowmult get def

src/databarlimitedcomposite.ps.src

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ begin
122122
/ai //gs1process exec pop pop pop
123123

124124
%
125-
% Plot the linear part
125+
% Generate metrics for the linear part
126126
%
127127
/uk.co.terryburton.bwipp._dontdraw true def
128128
linear options //databarlimited exec
@@ -139,7 +139,11 @@ begin
139139
sep 0 //databarlimitedcomposite.sepleft putinterval
140140
sep sep length 9 sub //databarlimitedcomposite.sepright putinterval % 4 + 5 right guard spaces
141141

142-
options (physspec) undef options (propspec) undef
142+
%
143+
% Generate metrics for the 2D part
144+
%
145+
options (physspec) undef
146+
options (propspec) undef
143147
comp options //gs1-cc exec /compsym exch def
144148
/ccpixs compsym /pixs get def
145149
/ccrowmult compsym /rowmult get def

src/databaromnicomposite.ps.src

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ begin
123123
/ai //gs1process exec pop pop pop
124124

125125
%
126-
% Plot the linear part
126+
% Generate metrics for the linear part
127127
%
128128
/uk.co.terryburton.bwipp._dontdraw true def
129129
linear options //databaromni exec
@@ -162,7 +162,11 @@ begin
162162
sep sep length 4 sub //databaromnicomposite.seppad putinterval
163163
18 sepfinder 64 sepfinder
164164

165-
options (physspec) undef options (propspec) undef
165+
%
166+
% Generate metrics for the 2D part
167+
%
168+
options (physspec) undef
169+
options (propspec) undef
166170
comp options //gs1-cc exec /compsym exch def
167171
/ccpixs compsym /pixs get def
168172
/ccrowmult compsym /rowmult get def

src/databarstackedcomposite.ps.src

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ begin
123123
/ai //gs1process exec pop pop pop
124124

125125
%
126-
% Plot the linear part
126+
% Generate metrics for the linear part
127127
%
128128
/uk.co.terryburton.bwipp._dontdraw true def
129129
linear options //databarstacked exec
@@ -161,7 +161,11 @@ begin
161161
sep sep length 4 sub //databarstackedcomposite.seppad putinterval
162162
18 sepfinder
163163

164-
options (physspec) undef options (propspec) undef
164+
%
165+
% Generate metrics for the 2D part
166+
%
167+
options (physspec) undef
168+
options (propspec) undef
165169
comp options //gs1-cc exec /compsym exch def
166170
/ccpixs compsym /pixs get def
167171
/ccrowmult compsym /rowmult get def

src/databarstackedomnicomposite.ps.src

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ begin
123123
/ai //gs1process exec pop pop pop
124124

125125
%
126-
% Plot the linear part
126+
% Generate metrics for the linear part
127127
%
128128
/uk.co.terryburton.bwipp._dontdraw true def
129129
linear options //databarstackedomni exec
@@ -161,7 +161,11 @@ begin
161161
sep sep length 4 sub //databarstackedomnicomposite.seppad putinterval
162162
18 sepfinder
163163

164-
options (physspec) undef options (propspec) undef
164+
%
165+
% Generate metrics for the 2D part
166+
%
167+
options (physspec) undef
168+
options (propspec) undef
165169
comp options //gs1-cc exec /compsym exch def
166170
/ccpixs compsym /pixs get def
167171
/ccrowmult compsym /rowmult get def

src/databartruncatedcomposite.ps.src

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ begin
124124
/ai //gs1process exec pop pop pop
125125

126126
%
127-
% Plot the linear part
127+
% Generate metrics for the linear part
128128
%
129129
/uk.co.terryburton.bwipp._dontdraw true def
130130
linear options //databartruncated exec
@@ -163,7 +163,11 @@ begin
163163
sep sep length 4 sub //databaromnicomposite.seppadright putinterval
164164
18 sepfinder 64 sepfinder
165165

166-
options (physspec) undef options (propspec) undef
166+
%
167+
% Generate metrics for the 2D part
168+
%
169+
options (physspec) undef
170+
options (propspec) undef
167171
comp options //gs1-cc exec /compsym exch def
168172
/ccpixs compsym /pixs get def
169173
/ccrowmult compsym /rowmult get def

src/ean13composite.ps.src

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ begin
9797
%
9898
/ean13composite ast /apply_ast //render exec not { //raiseerror exec } if
9999
/resolve_physspec //render exec
100+
100101
options (ast) undef
101102
options (propspec) propspec put
102103
options (physspec) physspec put
@@ -120,7 +121,7 @@ begin
120121
/ai //gs1process exec pop pop pop
121122

122123
%
123-
% Plot the linear part
124+
% Generate metrics for the linear part
124125
%
125126
/uk.co.terryburton.bwipp._dontdraw true def
126127
linear options //ean13 exec
@@ -130,12 +131,22 @@ begin
130131
/bbs linsym /bbs get def
131132
/linwidth 0 sbs {cvi add} forall def
132133

133-
options (physspec) undef options (propspec) undef
134+
135+
%
136+
% Generate metrics for the 2D part
137+
%
138+
options (physspec) undef
139+
options (propspec) undef
140+
134141
comp options //gs1-cc exec /compsym exch def
135142
/ccpixs compsym /pixs get def
136143
/ccrowmult compsym /rowmult get def
137144
/ccpixx compsym /pixx get def
138145

146+
%
147+
% Construct the composite symbol from the linear and 2D parts
148+
%
149+
139150
/linpad [ ccpixx 97 sub {0} repeat ] def
140151

141152
/txt [

src/ean8composite.ps.src

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ begin
123123
/ai //gs1process exec pop pop pop
124124

125125
%
126-
% Plot the linear part
126+
% Generate metrics for the linear part
127127
%
128128
/uk.co.terryburton.bwipp._dontdraw true def
129129
linear options //ean8 exec
@@ -133,7 +133,11 @@ begin
133133
/bbs linsym /bbs get def
134134
/linwidth 0 sbs {cvi add} forall def
135135

136-
options (physspec) undef options (propspec) undef
136+
%
137+
% Generate metrics for the 2D part
138+
%
139+
options (physspec) undef
140+
options (propspec) undef
137141
comp options //gs1-cc exec /compsym exch def
138142
/ccpixs compsym /pixs get def
139143
/ccrowmult compsym /rowmult get def

src/gs1-128composite.ps.src

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ begin
116116
/ai //gs1process exec pop pop pop
117117

118118
%
119-
% Dummy plot of linear part with CC-A to get width
119+
% Dummy linear metrics with CC-A to get width
120120
%
121121
options (linkagea) true put
122122
/uk.co.terryburton.bwipp._dontdraw true def
123123
linear << options {} forall >> //gs1-128 exec
124124
(sbs) get 0 exch {add} forall /linwidth exch def
125125

126126
%
127-
% Create 2D part and determine type
127+
% Generate metrics for the 2D part
128128
%
129129
options (lintype) (gs1-128) put
130130
options (linwidth) linwidth put
@@ -133,7 +133,7 @@ begin
133133
compsym (borderbottom) 0 put
134134

135135
%
136-
% Plot linear part
136+
% Generate metrics for the linear part
137137
%
138138
linktype (a) eq {
139139
options (linkagea) true put
@@ -155,7 +155,7 @@ begin
155155
counttomark 1 sub array astore /sep exch def pop pop
156156

157157
%
158-
% Plot the 2D part
158+
% Construct the composite symbol from the linear and 2D parts
159159
%
160160
linktype (a) eq {
161161
/s linwidth 2 sub 11 idiv def

0 commit comments

Comments
 (0)