1 /* 2 * Copyright 2013 ZXing authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.google.zxing.aztec.encoder; 18 19 import com.google.zxing.common.BitMatrix; 20 21 /** 22 * Aztec 2D code representation 23 * 24 * @author Rustam Abdullaev 25 */ 26 public final class AztecCode { 27 28 private boolean compact; 29 private int size; 30 private int layers; 31 private int codeWords; 32 private BitMatrix matrix; 33 34 /** 35 * @return {@code true} if compact instead of full mode 36 */ isCompact()37 public boolean isCompact() { 38 return compact; 39 } 40 setCompact(boolean compact)41 public void setCompact(boolean compact) { 42 this.compact = compact; 43 } 44 45 /** 46 * @return size in pixels (width and height) 47 */ getSize()48 public int getSize() { 49 return size; 50 } 51 setSize(int size)52 public void setSize(int size) { 53 this.size = size; 54 } 55 56 /** 57 * @return number of levels 58 */ getLayers()59 public int getLayers() { 60 return layers; 61 } 62 setLayers(int layers)63 public void setLayers(int layers) { 64 this.layers = layers; 65 } 66 67 /** 68 * @return number of data codewords 69 */ getCodeWords()70 public int getCodeWords() { 71 return codeWords; 72 } 73 setCodeWords(int codeWords)74 public void setCodeWords(int codeWords) { 75 this.codeWords = codeWords; 76 } 77 78 /** 79 * @return the symbol image 80 */ getMatrix()81 public BitMatrix getMatrix() { 82 return matrix; 83 } 84 setMatrix(BitMatrix matrix)85 public void setMatrix(BitMatrix matrix) { 86 this.matrix = matrix; 87 } 88 89 } 90