Skip to content

Commit 83d8e9e

Browse files
committed
Comments
1 parent 64e2a2a commit 83d8e9e

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/databarexpandedstacked.ps.src

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% Barcode Writer in Pure PostScript
22
% https://bwipp.terryburton.co.uk
33
%
4-
% Copyright (c) 2004-2024 Terry Burton
4+
% Copyright (c) 2004-2025 Terry Burton
55
%
66
% $Id$
77
%
@@ -46,15 +46,17 @@ dup /databarexpanded dup /uk.co.terryburton.bwipp findresource put
4646
begin
4747
/databarexpandedstacked {
4848

49-
20 dict begin % Confine variables to local scope
49+
20 dict begin
5050

5151
/ctx null def
5252
/dontdraw false def
5353

5454
//processoptions exec /options exch def
5555
/barcode exch def
5656

57+
%
5758
% Get the result of encoding with databarexpanded with format=expandedstacked
59+
%
5860
options (dontdraw) true put
5961
options (format) (expandedstacked) put
6062

src/databarstackedcomposite.ps.src

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% Barcode Writer in Pure PostScript
22
% https://bwipp.terryburton.co.uk
33
%
4-
% Copyright (c) 2004-2024 Terry Burton
4+
% Copyright (c) 2004-2025 Terry Burton
55
%
66
% $Id$
77
%
@@ -48,7 +48,7 @@ dup /renmatrix dup /uk.co.terryburton.bwipp findresource put
4848
begin
4949
/databarstackedcomposite {
5050

51-
20 dict begin % Confine variables to local scope
51+
20 dict begin
5252

5353
/ctx null def
5454
/dontdraw false def
@@ -62,7 +62,9 @@ begin
6262

6363
dontdraw { /usematrix true def } if
6464

65+
%
6566
% Split the linear and composite parts
67+
%
6668
barcode (|) search {
6769
/linear exch def
6870
pop
@@ -79,19 +81,25 @@ begin
7981
options (dontdraw) true put
8082
options (dontlint) true put
8183

84+
%
8285
% Lint the combined AI element strings
86+
%
8387
linear length comp length add string
8488
dup 0 linear putinterval
8589
dup linear length comp putinterval
8690
/ai //gs1process exec pop pop pop
8791

92+
%
8893
% Plot the linear part
94+
%
8995
linear options //databarstacked exec
9096
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
9197
dup (pixy) get /linheight exch def
9298
usematrix not { //renmatrix exec } { /pixs get /linpixs exch def } ifelse
9399

100+
%
94101
% Plot the separator
102+
%
95103
/sepfinder {
96104
/fp exch def
97105
fp 1 fp 12 add {
@@ -122,7 +130,9 @@ begin
122130

123131
currentpoint
124132

133+
%
125134
% Plot the 2D part
135+
%
126136
1 linheight 1 add rmoveto comp options //gs1-cc exec //renmatrix exec
127137

128138
linheight add moveto <<

0 commit comments

Comments
 (0)