Skip to content

Commit

Permalink
Symbols without readable text should start with text location NONE
Browse files Browse the repository at this point in the history
  • Loading branch information
gredler committed Mar 12, 2024
1 parent 8664413 commit 24b11a6
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public AustraliaPost() {
*/
public AustraliaPost(Mode mode) {
this.mode = mode;
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/AztecCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,13 @@ private static int avoidReferenceGrid(int input) {
private int structuredAppendPosition = 1;
private int structuredAppendTotal = 1;

/**
* Creates a new instance.
*/
public AztecCode() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
* <p>Sets a preferred symbol size. This value may be ignored if data string is
* too large to fit in the specified symbol size. Values correspond to symbol
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/AztecRune.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public class AztecRune extends Symbol {
0, 0, 22, 21, 20, 19, 18, 17, 16, 0, 0
};

/**
* Creates a new instance.
*/
public AztecRune() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

@Override
protected void encode() {

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/CodablockF.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ private enum CfMode {
private CfMode final_mode;
private CfMode[] subset_selector = new CfMode[44];

/**
* Creates a new instance.
*/
public CodablockF() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
* TODO: It doesn't appear that this symbol should support GS1 (it's not in the GS1 spec and Zint doesn't
* support GS1 with this type of symbology). However, the code below does contain GS1 checks, so we'll mark
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/Code16k.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ private enum Mode {
private int[] block_length = new int[170]; /* RENAME block_length */
private int block_count;

/**
* Creates a new instance.
*/
public Code16k() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

@Override
protected boolean gs1Supported() {
return true;
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/Code49.java
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,13 @@ public class Code49 extends Symbol {
'%', '!', '&', '*'
};

/**
* Creates a new instance.
*/
public Code49() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

@Override
protected boolean gs1Supported() {
return true;
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/CodeOne.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ private enum Mode {
private int[][] datagrid = new int[136][120];
private boolean[][] outputGrid = new boolean[148][134];

/**
* Creates a new instance.
*/
public CodeOne() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
* Sets the preferred symbol size / version. Versions A to H are square symbols.
* Version S and T are fixed height symbols. This value may be ignored if the input
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/DataMatrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ private enum Mode {
private int[] process_buffer = new int[8];
private int codewordCount;

/**
* Creates a new instance.
*/
public DataMatrix() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
* Forces the symbol to be either square or rectangular (non-square). Used only
* if a {@link #getPreferredSize() preferred size} has not been specified.
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/GridMatrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ private enum Mode {
private int preferredVersion = 0;
private int preferredEccLevel = -1;

/**
* Creates a new instance.
*/
public GridMatrix() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
* Set preferred size, or "version" of the symbol according to the following
* table. This value may be ignored if the data to be encoded does not fit
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/JapanPost.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public class JapanPost extends Symbol {
'd', 'e', 'f', 'g', 'h'
};

/**
* Creates a new instance.
*/
public JapanPost() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

@Override
protected void encode() {

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/KixCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ public class KixCode extends Symbol {
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
};

/**
* Creates a new instance.
*/
public KixCode() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

@Override
protected void encode() {

Expand Down
1 change: 1 addition & 0 deletions src/main/java/uk/org/okapibarcode/backend/MaxiCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public MaxiCode() {
*/
public MaxiCode(int mode) {
setMode(mode);
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/MicroQrCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ private enum qrMode {
private int[] grid;
private int[] eval;

/**
* Creates a new instance.
*/
public MicroQrCode() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
* <p>Sets the preferred symbol size. This value may be ignored if the
* data string is too large to fit into the specified symbol. Input
Expand Down
1 change: 1 addition & 0 deletions src/main/java/uk/org/okapibarcode/backend/Pdf417.java
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ public Pdf417() {
*/
public Pdf417(Mode mode) {
this.symbolMode = mode;
this.humanReadableLocation = HumanReadableLocation.NONE;
setBarHeight(3);
}

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/Pharmacode.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
*/
public class Pharmacode extends Symbol {

/**
* Creates a new instance.
*/
public Pharmacode() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

@Override
protected void encode() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
*/
public class Pharmacode2Track extends Symbol {

/**
* Creates a new instance.
*/
public Pharmacode2Track() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

@Override
protected void encode() {

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/uk/org/okapibarcode/backend/QrCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ private enum QrMode {
protected boolean improveEccLevelIfPossible = true;
protected boolean forceByteCompaction;

/**
* Creates a new instance.
*/
public QrCode() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

/**
* Sets the preferred symbol size / version. This value may be ignored if the data
* string is too large to fit into the specified symbol. Input values correspond
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ public class RoyalMail4State extends Symbol {
'U', 'V', 'W', 'X', 'Y', 'Z'
};

/**
* Creates a new instance.
*/
public RoyalMail4State() {
this.humanReadableLocation = HumanReadableLocation.NONE;
}

@Override
protected void encode() {

Expand Down

0 comments on commit 24b11a6

Please sign in to comment.