Lines Matching defs:border
171 private static BufferedImage toImage(QrCode qr, int scale, int border) {
172 return toImage(qr, scale, border, 0xFFFFFF, 0x000000);
178 * the specified module scale, border modules, and module colors.
179 * <p>For example, scale=10 and border=4 means to pad the QR Code with 4 light border
183 * @param border the number of border modules to add, which must be non-negative
188 * @throws IllegalArgumentException if the scale or border is out of range, or if
189 * {scale, border, size} cause the image dimensions to exceed Integer.MAX_VALUE
191 private static BufferedImage toImage(QrCode qr, int scale, int border, int lightColor, int darkColor) {
193 if (scale <= 0 || border < 0)
195 if (border > Integer.MAX_VALUE / 2 || qr.size + border * 2L > Integer.MAX_VALUE / scale)
196 throw new IllegalArgumentException("Scale or border too large");
198 BufferedImage result = new BufferedImage((qr.size + border * 2) * scale, (qr.size + border * 2) * scale, BufferedImage.TYPE_INT_RGB);
201 boolean color = qr.getModule(x / scale - border, y / scale - border);
217 * number of border modules. The string always uses Unix newlines (\n), regardless of the platform.
219 * @param border the number of border modules to add, which must be non-negative
224 * @throws IllegalArgumentException if the border is negative
226 private static String toSvgString(QrCode qr, int border, String lightColor, String darkColor) {
230 if (border < 0)
232 long brd = border;