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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? bidiline.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * * Copyright 2002 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 java.util.ArrayList;import java.awt.font.TextLayout;import java.text.AttributedString;import java.awt.font.TextAttribute;import java.awt.font.FontRenderContext;import java.awt.geom.AffineTransform;import java.util.HashMap;import com.lowagie.text.*;import java.io.*;/** Does all the line bidirectional processing with PdfChunk assembly. * * @author Paulo Soares (psoares@consiste.pt) */public class BidiLine {        protected int runDirection;    protected int pieceSize = 2048;    protected char text[] = new char[pieceSize];    protected PdfChunk detailChunks[] = new PdfChunk[pieceSize];    protected int totalTextLength = 0;        protected byte orderLevels[] = new byte[pieceSize];    protected int indexChars[] = new int[pieceSize];        protected ArrayList chunks = new ArrayList();    protected int indexChunk = 0;    protected int indexChunkChar = 0;    protected int currentChar = 0;        protected int storedRunDirection;    protected char storedText[] = new char[0];    protected PdfChunk storedDetailChunks[] = new PdfChunk[0];    protected int storedTotalTextLength = 0;        protected byte storedOrderLevels[] = new byte[0];    protected int storedIndexChars[] = new int[0];        protected int storedIndexChunk = 0;    protected int storedIndexChunkChar = 0;    protected int storedCurrentChar = 0;        protected boolean shortStore;    protected ArabicShaping arabic = new ArabicShaping(ArabicShaping.LETTERS_SHAPE | ArabicShaping.LENGTH_GROW_SHRINK | ArabicShaping.TEXT_DIRECTION_LOGICAL);    protected static final IntHashtable mirrorChars = new IntHashtable();    /** Creates new BidiLine */    public BidiLine() {    }        public boolean isEmpty() {        return (currentChar >= totalTextLength && indexChunk >= chunks.size());    }        public void clearChunks() {        chunks.clear();        totalTextLength = 0;        currentChar = 0;    }    public boolean getParagraph(int runDirection) {        this.runDirection = runDirection;        currentChar = 0;        totalTextLength = 0;        boolean hasText = false;        char c;        for (; indexChunk < chunks.size(); ++indexChunk) {            PdfChunk ck = (PdfChunk)chunks.get(indexChunk);            String s = ck.toString();            int len = s.length();            for (; indexChunkChar < len; ++indexChunkChar) {                c = s.charAt(indexChunkChar);                if (c == '\r' || c == '\n') {                    if (c == '\r' && indexChunkChar + 1 < len && s.charAt(indexChunkChar + 1) == '\n')                        ++indexChunkChar;                    ++indexChunkChar;                    if (indexChunkChar >= len) {                        indexChunkChar = 0;                        ++indexChunk;                    }                    hasText = true;                    if (totalTextLength == 0)                        detailChunks[0] = ck;                    break;                }                addPiece(c, ck);            }            if (hasText)                break;            indexChunkChar = 0;        }        if (totalTextLength == 0)            return hasText;        // remove trailing WS        totalTextLength = trimRight(0, totalTextLength - 1) + 1;        if (totalTextLength == 0)            return true;                if (runDirection == PdfWriter.RUN_DIRECTION_LTR || runDirection == PdfWriter.RUN_DIRECTION_RTL) {            if (orderLevels.length < totalTextLength) {                orderLevels = new byte[pieceSize];                indexChars = new int[pieceSize];            }            HashMap attr = new HashMap();            if (runDirection == PdfWriter.RUN_DIRECTION_LTR)                attr.put(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_LTR);            else                attr.put(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_RTL);                        TextLayout t = new TextLayout(new String(text, 0, totalTextLength), attr, new FontRenderContext(new AffineTransform(), false, true));            for (int k = 0; k < totalTextLength; ++k) {                orderLevels[k] = t.getCharacterLevel(k);                indexChars[k] = k;            }            doArabicShapping();            mirrorGlyphs();        }        totalTextLength = trimRightEx(0, totalTextLength - 1) + 1;        return true;    }        public void addChunk(PdfChunk chunk) {        chunks.add(chunk);    }        public void addChunks(ArrayList chunks) {        this.chunks.addAll(chunks);    }        public void addPiece(char c, PdfChunk chunk) {        if (totalTextLength >= pieceSize) {            char tempText[] = text;            PdfChunk tempDetailChunks[] = detailChunks;            pieceSize *= 2;            text = new char[pieceSize];            detailChunks = new PdfChunk[pieceSize];            System.arraycopy(tempText, 0, text, 0, totalTextLength);            System.arraycopy(tempDetailChunks, 0, detailChunks, 0, totalTextLength);        }        text[totalTextLength] = c;        detailChunks[totalTextLength++] = chunk;    }        public void save() {        if (indexChunk > 0) {            if (indexChunk >= chunks.size())                chunks.clear();            else {                for (--indexChunk; indexChunk >= 0; --indexChunk)                    chunks.remove(indexChunk);            }            indexChunk = 0;        }        storedRunDirection = runDirection;        storedTotalTextLength = totalTextLength;        storedIndexChunk = indexChunk;        storedIndexChunkChar = indexChunkChar;        storedCurrentChar = currentChar;        shortStore = (currentChar < totalTextLength);        if (!shortStore) {            // long save            if (storedText.length < totalTextLength) {                storedText = new char[totalTextLength];                storedDetailChunks = new PdfChunk[totalTextLength];            }            System.arraycopy(text, 0, storedText, 0, totalTextLength);            System.arraycopy(detailChunks, 0, storedDetailChunks, 0, totalTextLength);        }        if (runDirection == PdfWriter.RUN_DIRECTION_LTR || runDirection == PdfWriter.RUN_DIRECTION_RTL) {            if (storedOrderLevels.length < totalTextLength) {                storedOrderLevels = new byte[totalTextLength];                storedIndexChars = new int[totalTextLength];            }            System.arraycopy(orderLevels, currentChar, storedOrderLevels, currentChar, totalTextLength - currentChar);            System.arraycopy(indexChars, currentChar, storedIndexChars, currentChar, totalTextLength - currentChar);        }    }        public void restore() {        runDirection = storedRunDirection;        totalTextLength = storedTotalTextLength;        indexChunk = storedIndexChunk;        indexChunkChar = storedIndexChunkChar;        currentChar = storedCurrentChar;        if (!shortStore) {            // long restore            System.arraycopy(storedText, 0, text, 0, totalTextLength);            System.arraycopy(storedDetailChunks, 0, detailChunks, 0, totalTextLength);        }        if (runDirection == PdfWriter.RUN_DIRECTION_LTR || runDirection == PdfWriter.RUN_DIRECTION_RTL) {            System.arraycopy(storedOrderLevels, currentChar, orderLevels, currentChar, totalTextLength - currentChar);            System.arraycopy(storedIndexChars, currentChar, indexChars, currentChar, totalTextLength - currentChar);        }    }        public void mirrorGlyphs() {        for (int k = 0; k < totalTextLength; ++k) {            if ((orderLevels[k] & 1) == 1) {                int mirror = mirrorChars.get(text[k]);                if (mirror != 0)                    text[k] = (char)mirror;            }        }    }        public void doArabicShapping() {        int src = 0;        int dest = 0;        for (;;) {            while (src < totalTextLength) {                char c = text[src];                if (c >= 0x0600 && c <= 0x06ff)                    break;                if (src != dest) {                    text[dest] = text[src];                    detailChunks[dest] = detailChunks[src];                    orderLevels[dest] = orderLevels[src];                }                ++src;                ++dest;            }            if (src >= totalTextLength) {                totalTextLength = dest;                return;            }            int startArabicIdx = src;            ++src;            while (src < totalTextLength) {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区高清在线| 亚洲人亚洲人成电影网站色| 麻豆成人免费电影| 欧美精品欧美精品系列| 五月天激情综合| 日韩欧美一级二级三级| 国产在线观看一区二区| 国产精品高潮呻吟久久| 在线观看亚洲精品视频| 毛片av中文字幕一区二区| 久久日韩精品一区二区五区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 国产高清不卡一区二区| 欧美国产日韩在线观看| 日本久久精品电影| 免费高清在线视频一区·| 日韩高清在线观看| 久久精品欧美日韩精品 | 九九久久精品视频| 中文字幕一区二区三区在线播放| 91激情五月电影| 青青草国产精品亚洲专区无| 国产精品丝袜久久久久久app| 色94色欧美sute亚洲13| 久热成人在线视频| 亚洲欧美日韩国产综合在线| 在线播放亚洲一区| 成人动漫在线一区| 日本特黄久久久高潮| 欧美高清在线精品一区| 欧美日韩国产精品自在自线| 国产精品18久久久久| 亚洲成av人片在www色猫咪| 国产色爱av资源综合区| 欧美日本韩国一区二区三区视频| 国产老女人精品毛片久久| 亚洲在线视频网站| 欧美激情中文字幕一区二区| 欧美酷刑日本凌虐凌虐| 不卡一区二区在线| 激情综合五月婷婷| 日韩福利视频导航| 亚洲色图制服丝袜| 久久久久久久久久久电影| 欧美日韩精品一区二区三区四区 | 国产日韩精品一区| 欧美精品亚洲一区二区在线播放| 成人av在线影院| 国产在线精品不卡| 免费一级片91| 亚洲成人你懂的| 国产精品福利在线播放| 欧美大片一区二区三区| 欧美性猛交xxxxxxxx| 91视频国产资源| 国产suv一区二区三区88区| 日韩国产精品久久久| 玉足女爽爽91| 亚洲柠檬福利资源导航| 久久久久久久久久电影| 日韩精品一区二区三区在线播放| 欧美色区777第一页| 91久久精品一区二区三区| a美女胸又www黄视频久久| 国产91精品精华液一区二区三区| 精品一区二区三区视频在线观看| 日韩精品免费专区| 午夜欧美视频在线观看| 亚洲国产一区二区三区青草影视 | 亚洲va韩国va欧美va精品| 一区二区三区四区蜜桃| 亚洲老司机在线| 国产一区二区0| 激情综合网天天干| 久久99久久久欧美国产| 麻豆久久一区二区| 欧美a级理论片| 日本欧美一区二区在线观看| 午夜私人影院久久久久| 日韩精品福利网| 日本一不卡视频| 精品一二线国产| 国产一区二区三区在线观看免费视频| 激情久久久久久久久久久久久久久久| 久久精品国产精品亚洲红杏| 久久99精品国产麻豆婷婷| 国产一区二区久久| 国产成人99久久亚洲综合精品| 福利一区二区在线观看| 色哟哟一区二区在线观看| 在线亚洲人成电影网站色www| 在线视频国内一区二区| 91精品国产综合久久久蜜臀图片| 日韩视频一区在线观看| 久久先锋资源网| 亚洲欧洲精品一区二区精品久久久 | 99久久99久久精品免费观看 | 日韩专区在线视频| 久久爱另类一区二区小说| 国产电影一区二区三区| 91在线丨porny丨国产| 欧美日韩中文另类| 日韩一级在线观看| 欧美经典一区二区三区| 亚洲免费观看高清完整版在线观看熊 | 一区二区三区四区在线免费观看| 天天色图综合网| 国产伦精品一区二区三区免费 | 亚洲欧洲av色图| 亚洲国产欧美在线| 狠狠v欧美v日韩v亚洲ⅴ| 国产视频一区二区三区在线观看| 国产精品视频在线看| 五月婷婷综合在线| 国内精品伊人久久久久影院对白| av成人老司机| 欧美不卡视频一区| 中文字幕一区二区视频| 日韩不卡一二三区| 成人国产免费视频| 这里只有精品视频在线观看| 国产精品色在线观看| 青青草成人在线观看| 91视频在线看| 久久精品日产第一区二区三区高清版 | 国产成人av资源| 在线不卡一区二区| 亚洲婷婷综合色高清在线| 麻豆91免费看| 欧美又粗又大又爽| 久久久久久久精| 天堂资源在线中文精品| 99精品视频一区| 久久亚洲精精品中文字幕早川悠里| 亚洲一级二级三级| 不卡免费追剧大全电视剧网站| 正在播放亚洲一区| 亚洲国产视频一区二区| 99九九99九九九视频精品| 久久久久久久久久电影| 蜜桃视频在线一区| 欧美日本一区二区| 亚洲老妇xxxxxx| 成人国产精品免费观看动漫| 精品播放一区二区| 日本va欧美va精品发布| 欧美性三三影院| 一区二区在线免费| 色综合网站在线| 亚洲欧美色综合| 成人激情午夜影院| 国产免费观看久久| 国产精品自拍毛片| 精品粉嫩超白一线天av| 免费在线观看视频一区| 欧美丰满少妇xxxbbb| 亚洲成a人片在线观看中文| 在线观看国产精品网站| 亚洲人成人一区二区在线观看| 成人app下载| 国产精品第四页| www.久久精品| 亚洲欧洲制服丝袜| 色综合 综合色| 尤物在线观看一区| 在线国产亚洲欧美| 亚洲成人先锋电影| 制服丝袜日韩国产| 美美哒免费高清在线观看视频一区二区 | zzijzzij亚洲日本少妇熟睡| 国产三级精品三级| 国产.欧美.日韩| 国产精品伦一区| 色综合久久综合网97色综合| 一区二区在线观看免费| 欧美三电影在线| 欧美bbbbb| 久久久综合视频| 成年人国产精品| 亚洲一区二区欧美| 337p亚洲精品色噜噜| 久久精品国产99久久6| 国产日韩欧美不卡在线| 91视频观看视频| 亚洲一级不卡视频| 欧美成人官网二区| 国产馆精品极品| 亚洲免费大片在线观看| 欧美电影在线免费观看| 九色综合狠狠综合久久| 亚洲国产成人私人影院tom| 91香蕉国产在线观看软件| 丝袜诱惑亚洲看片| 久久综合丝袜日本网| 99麻豆久久久国产精品免费| 一区二区三区在线观看网站| 欧美一区二区在线视频| 国产成人亚洲精品狼色在线| 国产精品超碰97尤物18| 欧美一区二区精品在线|