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

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

?? metastate.java

?? java itext java itext java itext
?? JAVA
字號:
/*
 * $Id: MetaState.java,v 1.4 2001/12/10 13:53:22 blowagie Exp $
 * $Name:  $
 *
 * Copyright 2001 by Paulo Soares.
 *
 * This library is free software; you can redistribute it and/or modify it
 * 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.
 *
 * You should have received a copy of the GNU Library General Public License along
 * with this library; if not, write to the Free Foundation, Inc., 59 Temple Place,
 * Suite 330, Boston, MA 02111-1307 USA.
 *
 * 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/
 *
 * ir-arch Bruno Lowagie,
 * Adolf Baeyensstraat 121
 * 9040 Sint-Amandsberg
 * BELGIUM
 * tel. +32 (0)9 228.10.97
 * bruno@lowagie.com
 *
 */

package com.lowagie.text.pdf.wmf;

import java.util.ArrayList;
import java.util.Stack;
import java.awt.Point;
import java.awt.Color;
import com.lowagie.text.pdf.*;

public class MetaState {
    
    public static final int TA_NOUPDATECP = 0;
    public static final int TA_UPDATECP = 1;
    public static final int TA_LEFT = 0;
    public static final int TA_RIGHT = 2;
    public static final int TA_CENTER = 6;
    public static final int TA_TOP = 0;
    public static final int TA_BOTTOM = 8;
    public static final int TA_BASELINE = 24;
    
    public static final int TRANSPARENT = 1;
    public static final int OPAQUE = 2;

    public static final int ALTERNATE = 1;
    public static final int WINDING = 2;

    public Stack savedStates;
    public ArrayList MetaObjects;
    public Point currentPoint;
    public MetaPen currentPen;
    public MetaBrush currentBrush;
    public MetaFont currentFont;
    public Color currentBackgroundColor = Color.white;
    public Color currentTextColor = Color.black;
    public int backgroundMode = OPAQUE;
    public int polyFillMode = ALTERNATE;
    public int lineJoin = 1;
    public int textAlign;
    public int offsetWx;
    public int offsetWy;
    public int extentWx;
    public int extentWy;
    public float scalingX;
    public float scalingY;
    

    /** Creates new MetaState */
    public MetaState() {
        savedStates = new Stack();
        MetaObjects = new ArrayList();
        currentPoint = new Point(0, 0);
        currentPen = new MetaPen();
        currentBrush = new MetaBrush();
    }

    public MetaState(MetaState state) {
        setMetaState(state);
    }
    
    public void setMetaState(MetaState state) {
        savedStates = state.savedStates;
        MetaObjects = state.MetaObjects;
        currentPoint = state.currentPoint;
        currentPen = state.currentPen;
        currentBrush = state.currentBrush;
        currentFont = state.currentFont;
        currentBackgroundColor = state.currentBackgroundColor;
        currentTextColor = state.currentTextColor;
        backgroundMode = state.backgroundMode;
        polyFillMode = state.polyFillMode;
        textAlign = state.textAlign;
        lineJoin = state.lineJoin;
        offsetWx = state.offsetWx;
        offsetWy = state.offsetWy;
        extentWx = state.extentWx;
        extentWy = state.extentWy;
        scalingX = state.scalingX;
        scalingY = state.scalingY;
    }

    public void addMetaObject(MetaObject object) {
        for (int k = 0; k < MetaObjects.size(); ++k) {
            if (MetaObjects.get(k) == null) {
                MetaObjects.set(k, object);
                return;
            }
        }
        MetaObjects.add(object);
    }
    
    public void selectMetaObject(int index, PdfContentByte cb) {
        MetaObject obj = (MetaObject)MetaObjects.get(index);
        if (obj == null)
            return;
        int style;
        switch (obj.getType()) {
            case MetaObject.META_BRUSH:
                currentBrush = (MetaBrush)obj;
                style = currentBrush.getStyle();
                if (style == MetaBrush.BS_SOLID) {
                    Color color = currentBrush.getColor();
                    cb.setRGBColorFill(color.getRed(), color.getGreen(), color.getBlue());
                }
                else if (style == MetaBrush.BS_HATCHED) {
                    Color color = currentBackgroundColor;
                    cb.setRGBColorFill(color.getRed(), color.getGreen(), color.getBlue());
                }
                break;
            case MetaObject.META_PEN:
            {
                currentPen = (MetaPen)obj;
                style = currentPen.getStyle();
                if (style != MetaPen.PS_NULL) {
                    Color color = currentPen.getColor();
                    cb.setRGBColorStroke(color.getRed(), color.getGreen(), color.getBlue());
                    cb.setLineWidth(Math.abs((float)currentPen.getPenWidth() * scalingX / extentWx));
                    switch (style) {
                        case MetaPen.PS_DASH:
                            cb.setLineDash(18, 6, 0);
                            break;
                        case MetaPen.PS_DASHDOT:
                            cb.setLiteral("[9 6 3 6]0 d\n");
                            break;
                        case MetaPen.PS_DASHDOTDOT:
                            cb.setLiteral("[9 3 3 3 3 3]0 d\n");
                            break;
                        case MetaPen.PS_DOT:
                            cb.setLineDash(3, 0);
                            break;
                        default:
                            cb.setLineDash(0);
                            break;                            
                    }
                }
                break;
            }
            case MetaObject.META_FONT:
            {
                currentFont = (MetaFont)obj;
                break;
            }
        }
    }
    
    public void deleteMetaObject(int index) {
        MetaObjects.set(index, null);
    }
    
    public void saveState(PdfContentByte cb) {
        cb.saveState();
        MetaState state = new MetaState(this);
        savedStates.push(this);
    }

    public void restoreState(int index, PdfContentByte cb) {
        int pops;
        if (index < 0)
            pops = Math.min(-index, savedStates.size());
        else
            pops = Math.max(savedStates.size() - index, 0);
        if (pops == 0)
            return;
        MetaState state = null;
        while (pops-- != 0) {
            cb.restoreState();
            state = (MetaState)savedStates.pop();
        }
        setMetaState(state);
    }
    
    public float transformX(int x) {
        return ((float)x - offsetWx) * scalingX / extentWx;
    }

    public float transformY(int y) {
        return (1f - ((float)y - offsetWy) / extentWy) * scalingY;
    }
    
    public void setScalingX(float scalingX) {
        this.scalingX = scalingX;
    }
    
    public void setScalingY(float scalingY) {
        this.scalingY = scalingY;
    }
    
    public void setOffsetWx(int offsetWx) {
        this.offsetWx = offsetWx;
    }
    
    public void setOffsetWy(int offsetWy) {
        this.offsetWy = offsetWy;
    }
    
    public void setExtentWx(int extentWx) {
        this.extentWx = extentWx;
    }
    
    public void setExtentWy(int extentWy) {
        this.extentWy = extentWy;
    }
    
    public void setCurrentPoint(Point p) {
        currentPoint = p;
    }

    public Point getCurrentPoint() {
        return currentPoint;
    }
    
    public MetaBrush getCurrentBrush() {
        return currentBrush;
    }

    public MetaPen getCurrentPen() {
        return currentPen;
    }

    public MetaFont getCurrentFont() {
        return currentFont;
    }
    
    /** Getter for property currentBackgroundColor.
     * @return Value of property currentBackgroundColor.
     */
    public Color getCurrentBackgroundColor() {
        return currentBackgroundColor;
    }
    
    /** Setter for property currentBackgroundColor.
     * @param currentBackgroundColor New value of property currentBackgroundColor.
     */
    public void setCurrentBackgroundColor(Color currentBackgroundColor) {
        this.currentBackgroundColor = currentBackgroundColor;
    }
    
    /** Getter for property currentTextColor.
     * @return Value of property currentTextColor.
     */
    public Color getCurrentTextColor() {
        return currentTextColor;
    }
    
    /** Setter for property currentTextColor.
     * @param currentTextColor New value of property currentTextColor.
     */
    public void setCurrentTextColor(Color currentTextColor) {
        this.currentTextColor = currentTextColor;
    }
    
    /** Getter for property backgroundMode.
     * @return Value of property backgroundMode.
     */
    public int getBackgroundMode() {
        return backgroundMode;
    }
    
    /** Setter for property backgroundMode.
     * @param backgroundMode New value of property backgroundMode.
     */
    public void setBackgroundMode(int backgroundMode) {
        this.backgroundMode = backgroundMode;
    }
    
    /** Getter for property textAlign.
     * @return Value of property textAlign.
     */
    public int getTextAlign() {
        return textAlign;
    }
    
    /** Setter for property textAlign.
     * @param textAlign New value of property textAlign.
     */
    public void setTextAlign(int textAlign) {
        this.textAlign = textAlign;
    }
    
    /** Getter for property polyFillMode.
     * @return Value of property polyFillMode.
     */
    public int getPolyFillMode() {
        return polyFillMode;
    }
    
    /** Setter for property polyFillMode.
     * @param polyFillMode New value of property polyFillMode.
     */
    public void setPolyFillMode(int polyFillMode) {
        this.polyFillMode = polyFillMode;
    }
    
    public void setLineJoinRectangle(PdfContentByte cb) {
        if (lineJoin != 0) {
            lineJoin = 0;
            cb.setLineJoin(0);
        }
    }
    
    public void setLineJoinPolygon(PdfContentByte cb) {
        if (lineJoin == 0) {
            lineJoin = 1;
            cb.setLineJoin(1);
        }
    }
    
    public boolean getLineNeutral() {
        return (lineJoin == 0);
    }
    
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级日韩不卡播放免费| 亚洲一区二区五区| 亚洲第一av色| 国产1区2区3区精品美女| 欧美日韩精品久久久| 中文字幕一区二区三区精华液| 美女视频一区在线观看| 在线观看精品一区| 国产精品三级久久久久三级| 久久成人麻豆午夜电影| 欧美日韩大陆一区二区| 亚洲欧美一区二区久久| 国产成人久久精品77777最新版本| 欧美男女性生活在线直播观看| 亚洲色欲色欲www在线观看| 国产精品99久久久久久久女警| 欧美一区二区三区成人| 五月婷婷综合在线| 欧美喷潮久久久xxxxx| 亚洲一区二区欧美日韩| 色又黄又爽网站www久久| 国产精品福利一区二区| 国产丶欧美丶日本不卡视频| 久久久另类综合| 国模大尺度一区二区三区| 日韩精品一区二区三区swag| 日本午夜一本久久久综合| 欧美妇女性影城| 日韩精品亚洲一区| 日韩欧美视频在线| 激情综合色综合久久综合| 欧美mv日韩mv国产网站app| 蜜桃久久久久久久| ww亚洲ww在线观看国产| 精品系列免费在线观看| 久久久亚洲综合| 成人动漫一区二区三区| 亚洲三级在线免费观看| 在线日韩一区二区| 午夜国产精品影院在线观看| 欧美高清视频在线高清观看mv色露露十八 | 欧美日韩亚洲综合| 亚洲h在线观看| 欧美一区二区三区不卡| 国产在线精品免费| 国产精品理论片在线观看| 91啦中文在线观看| 日韩精品久久理论片| 日韩欧美不卡在线观看视频| 国产精品一区二区免费不卡 | 国产一区二区三区精品欧美日韩一区二区三区| 日韩欧美一区二区久久婷婷| 国产精品综合久久| 亚洲人成亚洲人成在线观看图片| 欧美在线高清视频| 久久99精品网久久| 日韩美女视频一区二区| 欧美精品在欧美一区二区少妇| 麻豆专区一区二区三区四区五区| 国产日本欧美一区二区| 一本一道久久a久久精品| 青青草成人在线观看| 日本一区二区视频在线| 欧美性猛交一区二区三区精品| 麻豆国产精品777777在线| 欧美国产禁国产网站cc| 欧美日韩另类国产亚洲欧美一级| 激情国产一区二区| 亚洲精品国产无套在线观| 欧美大白屁股肥臀xxxxxx| 不卡一区中文字幕| 欧美a级理论片| 国产精品丝袜一区| 在线不卡免费av| 99在线精品观看| 蜜臀久久久99精品久久久久久| 亚洲视频狠狠干| 久久久国际精品| 欧美一区二区三区影视| 色综合中文字幕国产| 亚洲超碰精品一区二区| 国产精品久久久久婷婷二区次| 欧美丰满高潮xxxx喷水动漫| 成人福利视频在线| 国产在线精品一区在线观看麻豆| 亚洲激情中文1区| 国产三级久久久| 欧美一区二区视频网站| 97精品国产露脸对白| 国产成人在线色| 国产主播一区二区| 亚洲成人www| 亚洲自拍与偷拍| 国产精品不卡在线| 国产欧美精品一区二区色综合| 日韩精品一区二区三区视频在线观看 | 一区二区三区欧美| 中文字幕在线观看一区| 久久夜色精品一区| 欧美大片在线观看| 欧美一区二区三区精品| 欧美精品国产精品| 91精品国产综合久久福利软件| 欧美三级乱人伦电影| 91福利国产精品| 欧美专区日韩专区| 日本韩国一区二区三区| 91精品办公室少妇高潮对白| 91天堂素人约啪| 色欧美日韩亚洲| 91成人免费在线| 欧美午夜精品电影| 欧美日韩小视频| 777午夜精品视频在线播放| 欧美美女喷水视频| 欧美精品1区2区3区| 国产精品免费aⅴ片在线观看| 欧美激情中文字幕一区二区| 日本一二三四高清不卡| 国产精品青草综合久久久久99| 国产亚洲欧美一级| 中文一区二区在线观看| 亚洲毛片av在线| 亚洲国产视频网站| 丝袜a∨在线一区二区三区不卡| 日本欧美在线观看| 国产在线国偷精品产拍免费yy | 欧美在线色视频| 在线播放国产精品二区一二区四区| 91精品视频网| 久久人人97超碰com| 国产精品护士白丝一区av| 一区二区三区资源| 日韩 欧美一区二区三区| 精品一区二区免费视频| 国产成人无遮挡在线视频| 99精品欧美一区| 欧美自拍丝袜亚洲| 日韩美女视频一区二区在线观看| 精品福利一区二区三区免费视频| 国产精品女主播av| 亚洲午夜激情网站| 精品一区二区三区视频| 成人久久18免费网站麻豆 | 久久久欧美精品sm网站| 日韩伦理电影网| 免费人成在线不卡| 国产91精品精华液一区二区三区| 91久久一区二区| 2022国产精品视频| 亚洲欧美日韩精品久久久久| 视频精品一区二区| 成人av资源在线观看| 欧美一区二区三区免费| 国产精品美女一区二区三区| 天天做天天摸天天爽国产一区| 成人在线综合网| 欧美一二三在线| 一区二区三区四区不卡在线| 精品一二三四区| 欧美日韩亚洲另类| 中文字幕制服丝袜成人av| 久久av中文字幕片| 在线亚洲高清视频| 中文字幕高清不卡| 麻豆一区二区三| 在线观看日韩电影| 国产精品美女久久久久aⅴ国产馆| 蜜桃视频一区二区三区在线观看| 色综合久久88色综合天天| 久久青草欧美一区二区三区| 日日欢夜夜爽一区| 色婷婷综合久久久久中文一区二区| 久久久午夜精品| 久久精品国产亚洲5555| 欧美日韩情趣电影| 亚洲精品视频免费看| 成人的网站免费观看| 久久久精品影视| 国内精品视频一区二区三区八戒| 717成人午夜免费福利电影| 一区二区三区在线影院| 99re这里只有精品视频首页| 国产色产综合色产在线视频| 久热成人在线视频| 欧美一区二区二区| 日日噜噜夜夜狠狠视频欧美人 | 午夜久久久久久久久久一区二区| 日韩一区二区免费在线电影| 午夜伦理一区二区| 欧美亚洲高清一区二区三区不卡| 亚洲欧美国产毛片在线| 97国产一区二区| 亚洲日本在线天堂| 色呦呦一区二区三区| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 成人福利视频网站| 专区另类欧美日韩| 日本精品一区二区三区高清| 一级日本不卡的影视|