亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? barcodeinter25.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
字號:
/* * Copyright 2002 by Paulo Soares. * * The contents of this file are subject to the Mozilla Public License Version 1.1 * (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the License. * * The Original Code is 'iText, a free JAVA-PDF library'. * * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie. * All Rights Reserved. * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved. * * Contributor(s): all the names of the contributors are added in the source code * where applicable. * * Alternatively, the contents of this file may be used under the terms of the * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the * provisions of LGPL are applicable instead of those above.  If you wish to * allow use of your version of this file only under the terms of the LGPL * License and not to allow others to use your version of this file under * the MPL, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the LGPL. * If you do not delete the provisions above, a recipient may use your version * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE. * * This library is free software; you can redistribute it and/or modify it * under the terms of the MPL as stated above or under the terms of the GNU * Library General Public License as published by the Free Software Foundation; * either version 2 of the License, or any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more * details. * * If you didn't download this code from the following link, you should check if * you aren't using an obsolete version: * http://www.lowagie.com/iText/ */package com.lowagie.text.pdf;import com.lowagie.text.ExceptionConverter;import com.lowagie.text.Element;import com.lowagie.text.Rectangle;import java.awt.Color;/** Implements the code interleaved 2 of 5. The text can include * non numeric characters that are printed but do not generate bars. * The default parameters are: * <pre> *x = 0.8f; *n = 2; *font = BaseFont.createFont("Helvetica", "winansi", false); *size = 8; *baseline = size; *barHeight = size * 3; *textAlignment = Element.ALIGN_CENTER; *generateChecksum = false; *checksumText = false; * </pre> * * @author Paulo Soares (psoares@consiste.pt) */public class BarcodeInter25 extends Barcode{    /** The bars to generate the code.     */        static byte BARS[][] =    {        {0,0,1,1,0},        {1,0,0,0,1},        {0,1,0,0,1},        {1,1,0,0,0},        {0,0,1,0,1},        {1,0,1,0,0},        {0,1,1,0,0},        {0,0,0,1,1},        {1,0,0,1,0},        {0,1,0,1,0}    };    /** Creates new BarcodeInter25 */    public BarcodeInter25() {        try {            x = 0.8f;            n = 2;            font = BaseFont.createFont("Helvetica", "winansi", false);            size = 8;            baseline = size;            barHeight = size * 3;            textAlignment = Element.ALIGN_CENTER;            generateChecksum = false;            checksumText = false;        }        catch (Exception e) {            throw new ExceptionConverter(e);        }    }        /** Deletes all the non numeric characters from <CODE>text</CODE>.     * @param text the text     * @return a <CODE>String</CODE> with only numeric characters     */        public static String keepNumbers(String text) {        StringBuffer sb = new StringBuffer();        for (int k = 0; k < text.length(); ++k) {            char c = text.charAt(k);            if (c >= '0' && c <= '9')                sb.append(c);        }        return sb.toString();    }        /** Calculates the checksum.     * @param text the numeric text     * @return the checksum     */        public static char getChecksum(String text) {        int mul = 3;        int total = 0;        for (int k = text.length() - 1; k >= 0; --k) {            int n = text.charAt(k) - '0';            total += mul * n;            mul ^= 2;        }        return (char)(((10 - (total % 10)) % 10) + '0');    }    /** Creates the bars for the barcode.     * @param text the text. It can contain non numeric characters     * @return the barcode     */        public static byte[] getBarsInter25(String text) {        text = keepNumbers(text);        byte bars[] = new byte[text.length() * 5 + 7];        int pb = 0;        bars[pb++] = 0;        bars[pb++] = 0;        bars[pb++] = 0;        bars[pb++] = 0;        int len = text.length() / 2;        for (int k = 0; k < len; ++k) {            int c1 = text.charAt(k * 2) - '0';            int c2 = text.charAt(k * 2 + 1) - '0';            byte b1[] = BARS[c1];            byte b2[] = BARS[c2];            for (int j = 0; j < 5; ++j) {                bars[pb++] = b1[j];                bars[pb++] = b2[j];            }        }        bars[pb++] = 1;        bars[pb++] = 0;        bars[pb++] = 0;        return bars;    }    /** Gets the maximum area that the barcode and the text, if     * any, will occupy. The lower left corner is always (0, 0).     * @return the size the barcode occupies.     */        public Rectangle getBarcodeSize() {        float fontX = 0;        float fontY = 0;        if (font != null) {            if (baseline > 0)                fontY = baseline - font.getFontDescriptor(BaseFont.DESCENT, size);            else                fontY = -baseline + size;            String fullCode = code;            if (generateChecksum && checksumText)                fullCode += getChecksum(fullCode);            fontX = font.getWidthPoint(fullCode, size);        }        String fullCode = keepNumbers(code);        int len = fullCode.length();        if (generateChecksum)            ++len;        float fullWidth = len * (3 * x + 2 * x * n) + (6 + n ) * x;        fullWidth = Math.max(fullWidth, fontX);        float fullHeight = barHeight + fontY;        return new Rectangle(fullWidth, fullHeight);    }        /** Places the barcode in a <CODE>PdfContentByte</CODE>. The     * barcode is always placed at coodinates (0, 0). Use the     * translation matrix to move it elsewhere.<p>     * The bars and text are written in the following colors:<p>     * <P><TABLE BORDER=1>     * <TR>     *    <TH><P><CODE>barColor</CODE></TH>     *    <TH><P><CODE>textColor</CODE></TH>     *    <TH><P>Result</TH>     *    </TR>     * <TR>     *    <TD><P><CODE>null</CODE></TD>     *    <TD><P><CODE>null</CODE></TD>     *    <TD><P>bars and text painted with current fill color</TD>     *    </TR>     * <TR>     *    <TD><P><CODE>barColor</CODE></TD>     *    <TD><P><CODE>null</CODE></TD>     *    <TD><P>bars and text painted with <CODE>barColor</CODE></TD>     *    </TR>     * <TR>     *    <TD><P><CODE>null</CODE></TD>     *    <TD><P><CODE>textColor</CODE></TD>     *    <TD><P>bars painted with current color<br>text painted with <CODE>textColor</CODE></TD>     *    </TR>     * <TR>     *    <TD><P><CODE>barColor</CODE></TD>     *    <TD><P><CODE>textColor</CODE></TD>     *    <TD><P>bars painted with <CODE>barColor</CODE><br>text painted with <CODE>textColor</CODE></TD>     *    </TR>     * </TABLE>     * @param cb the <CODE>PdfContentByte</CODE> where the barcode will be placed     * @param barColor the color of the bars. It can be <CODE>null</CODE>     * @param textColor the color of the text. It can be <CODE>null</CODE>     * @return the dimensions the barcode occupies     */        public Rectangle placeBarcode(PdfContentByte cb, Color barColor, Color textColor) {        String fullCode = code;        float fontX = 0;        if (font != null) {            if (generateChecksum && checksumText)                fullCode += getChecksum(fullCode);            fontX = font.getWidthPoint(fullCode, size);        }        String bCode = keepNumbers(code);        if (generateChecksum)            bCode += getChecksum(bCode);        int len = bCode.length();        float fullWidth = len * (3 * x + 2 * x * n) + (6 + n ) * x;        float barStartX = 0;        float textStartX = 0;        switch (textAlignment) {            case Element.ALIGN_LEFT:                break;            case Element.ALIGN_RIGHT:                if (fontX > fullWidth)                    barStartX = fontX - fullWidth;                else                    textStartX = fullWidth - fontX;                break;            default:                if (fontX > fullWidth)                    barStartX = (fontX - fullWidth) / 2;                else                    textStartX = (fullWidth - fontX) / 2;                break;        }        float barStartY = 0;        float textStartY = 0;        if (font != null) {            if (baseline <= 0)                textStartY = barHeight - baseline;            else {                textStartY = -font.getFontDescriptor(BaseFont.DESCENT, size);                barStartY = textStartY + baseline;            }        }        byte bars[] = getBarsInter25(bCode);        boolean print = true;        if (barColor != null)            cb.setColorFill(barColor);        for (int k = 0; k < bars.length; ++k) {            float w = (bars[k] == 0 ? x : x * n);            if (print)                cb.rectangle(barStartX, barStartY, w, barHeight);            print = !print;            barStartX += w;        }        cb.fill();        if (font != null) {            if (textColor != null)                cb.setColorFill(textColor);            cb.beginText();            cb.setFontAndSize(font, size);            cb.setTextMatrix(textStartX, textStartY);            cb.showText(fullCode);            cb.endText();        }        return getBarcodeSize();    }   }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩va欧美va亚洲va久久| 国产精品网站在线| 欧美一区二区三区日韩视频| 在线不卡欧美精品一区二区三区| 日韩视频永久免费| 中文字幕亚洲不卡| 免费成人结看片| 色婷婷激情综合| 久久精品免视看| 美女在线一区二区| 成人开心网精品视频| 欧美嫩在线观看| 中文字幕精品—区二区四季| 五月天激情综合网| jlzzjlzz亚洲女人18| 精品国免费一区二区三区| 亚洲免费资源在线播放| 国产一区二区三区黄视频| 欧美综合视频在线观看| 国产三级精品视频| 久久国产乱子精品免费女| 欧美吞精做爰啪啪高潮| 亚洲三级理论片| 成人国产视频在线观看| 久久综合色播五月| 国内精品写真在线观看| 日韩三区在线观看| 奇米影视一区二区三区| 51午夜精品国产| 天天综合日日夜夜精品| 欧美精品一级二级三级| 亚洲高清中文字幕| 欧美日韩的一区二区| 免费成人性网站| 日韩一区二区视频在线观看| 日韩黄色一级片| 亚洲精品国久久99热| 欧美自拍偷拍一区| 婷婷开心久久网| 亚洲人成精品久久久久| 欧美性高清videossexo| 五月天激情综合网| 久久久国产精品午夜一区ai换脸| 国产乱人伦偷精品视频免下载| 欧美高清在线精品一区| 91欧美一区二区| 国内精品视频666| 国产无一区二区| 欧美午夜片在线观看| 蜜桃91丨九色丨蝌蚪91桃色| 久久在线观看免费| 欧洲av在线精品| 精品一区二区三区在线播放| 亚洲视频一区在线| 精品国产一区二区三区不卡| 91视频国产资源| 国内成人精品2018免费看| 亚洲婷婷综合久久一本伊一区| 日韩欧美中文一区| 91黄色小视频| 国产suv精品一区二区883| 日本少妇一区二区| 国产亚洲精品福利| 国产精品传媒在线| 欧美一区二区三区婷婷月色| 色综合天天综合给合国产| 国产乱色国产精品免费视频| 日韩福利视频导航| 天天av天天翘天天综合网| 国产精品成人一区二区三区夜夜夜| 欧美日产国产精品| 99在线精品观看| 狠狠色狠狠色综合| 日本美女视频一区二区| 亚洲美女在线国产| 国产欧美日韩三区| 欧美精品一区二区三区四区| 制服.丝袜.亚洲.中文.综合| 在线精品视频小说1| 91一区二区在线| 91麻豆福利精品推荐| 国产凹凸在线观看一区二区| 国产福利91精品一区二区三区| 麻豆成人久久精品二区三区小说| 亚洲成人午夜影院| 日韩成人免费在线| 亚洲成人午夜影院| 午夜成人免费电影| 日产精品久久久久久久性色| 丝袜亚洲另类欧美综合| 奇米综合一区二区三区精品视频| 无码av中文一区二区三区桃花岛| 日韩影视精彩在线| 国产精品1024| 欧美性色黄大片手机版| 久久久亚洲午夜电影| 亚洲色图制服丝袜| 免费观看日韩av| 91在线观看免费视频| 欧美精品日韩精品| 国产精品久久久久久久久晋中| 国产精品久久久久aaaa樱花| 婷婷成人激情在线网| 色综合欧美在线视频区| 精品国产a毛片| 偷拍一区二区三区| 91美女蜜桃在线| 久久久久99精品国产片| 午夜精品福利一区二区三区av | 久久不见久久见免费视频7| www.亚洲色图| 国产亚洲精品免费| 日韩高清国产一区在线| 日本丶国产丶欧美色综合| 国产欧美一区二区精品性色超碰 | 欧美日韩专区在线| 国产亚洲精品免费| 韩国女主播一区二区三区| 欧美一区二区三区精品| 亚洲美腿欧美偷拍| 成人av在线资源网| 中文字幕第一区| 国产成人av一区| 中文字幕欧美国产| 国产成人精品aa毛片| 欧美精品一区二区在线播放 | 91精品国产综合久久久久久久久久 | 69堂亚洲精品首页| 天堂资源在线中文精品| 欧美日韩国产影片| 亚洲尤物在线视频观看| 91精品欧美综合在线观看最新| 亚洲一区二区三区三| 91精品麻豆日日躁夜夜躁| 国产中文字幕精品| 日本一区二区三区免费乱视频| av亚洲精华国产精华| 亚洲欧美日韩国产中文在线| 在线播放91灌醉迷j高跟美女| 日本伊人色综合网| 国产婷婷色一区二区三区在线| 色狠狠一区二区三区香蕉| 午夜在线成人av| 国产农村妇女毛片精品久久麻豆 | 国产精品第四页| 欧美日韩中文精品| 国产.欧美.日韩| 蜜桃视频一区二区三区在线观看 | 久久91精品国产91久久小草| 国产精品网站一区| 欧美电影在线免费观看| 成人免费的视频| 老司机精品视频在线| 中文乱码免费一区二区| 欧美一区二区三区男人的天堂| 成人免费高清在线| 国产乱人伦偷精品视频不卡| 夜夜精品浪潮av一区二区三区| 久久婷婷久久一区二区三区| 欧美日韩一卡二卡三卡| 色婷婷亚洲婷婷| 成人激情小说网站| 国产不卡在线一区| 精品在线一区二区| 久久精品国产精品亚洲精品 | 成人av集中营| 精品在线免费视频| 国内精品嫩模私拍在线| 天天综合网天天综合色| 亚洲国产精品综合小说图片区| 亚洲精品亚洲人成人网在线播放| 国产欧美综合在线观看第十页 | 免费观看久久久4p| 亚洲va在线va天堂| 丝袜亚洲另类丝袜在线| 日本美女一区二区三区视频| 亚洲国产成人av| 日韩精品欧美精品| 日韩国产欧美三级| 激情偷乱视频一区二区三区| 国产91富婆露脸刺激对白| 色婷婷久久综合| 欧美日韩国产影片| 久久午夜色播影院免费高清| 国产日本一区二区| 亚洲精品成人悠悠色影视| 美女视频免费一区| 国产成人综合精品三级| 欧美在线高清视频| 久久蜜桃av一区精品变态类天堂| 国产日产欧产精品推荐色 | 风间由美一区二区三区在线观看 | 水野朝阳av一区二区三区| 日本vs亚洲vs韩国一区三区二区| 国产成人免费高清| 在线91免费看| 亚洲人成7777| 成人免费黄色在线| 日韩免费视频线观看| 亚洲成人免费av|