1 58 package org.krysalis.barcode; 59 60 66 public class BarcodeDimension { 67 68 private double width; 69 private double height; 70 71 private double widthPlusQuiet; 72 private double heightPlusQuiet; 73 private double xOffset; 74 private double yOffset; 75 76 81 public BarcodeDimension(double w, double h) { 82 this.width = w; 83 this.height = h; 84 this.widthPlusQuiet = this.width; 85 this.heightPlusQuiet = this.height; 86 this.xOffset = 0.0; 87 this.yOffset = 0.0; 88 } 89 90 101 public BarcodeDimension(double w, double h, 102 double wpq, double hpq, 103 double xoffset, double yoffset) { 104 this.width = w; 105 this.height = h; 106 this.widthPlusQuiet = wpq; 107 this.heightPlusQuiet = hpq; 108 this.xOffset = xoffset; 109 this.yOffset = yoffset; 110 } 111 112 113 117 public double getHeight() { 118 return height; 119 } 120 121 125 public double getHeightPlusQuiet() { 126 return heightPlusQuiet; 127 } 128 129 133 public double getWidth() { 134 return width; 135 } 136 137 141 public double getWidthPlusQuiet() { 142 return widthPlusQuiet; 143 } 144 145 150 public double getXOffset() { 151 return xOffset; 152 } 153 154 159 public double getYOffset() { 160 return yOffset; 161 } 162 163 166 public String toString() { 167 StringBuffer sb = new StringBuffer (super.toString()); 168 sb.append("[width="); 169 sb.append(getWidth()); 170 sb.append("("); 171 sb.append(getWidthPlusQuiet()); 172 sb.append("),height="); 173 sb.append(getHeight()); 174 sb.append("("); 175 sb.append(getHeightPlusQuiet()); 176 sb.append(")]"); 177 return sb.toString(); 178 } 179 } 180 | Popular Tags |