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

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

?? pdfshading.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
字號:
/* * 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.awt.Color;import java.io.IOException;/** Implements the shading dictionary (or stream). * * @author Paulo Soares (psoares@consiste.pt) */public class PdfShading {    protected PdfDictionary shading;        protected PdfWriter writer;        protected int shadingType;        protected ColorDetails colorDetails;        protected PdfName shadingName;        protected PdfIndirectReference shadingReference;        /** Holds value of property bBox. */    protected float[] bBox;        /** Holds value of property antiAlias. */    protected boolean antiAlias = false;        /** Creates new PdfShading */    protected PdfShading(PdfWriter writer) {        this.writer = writer;    }        protected void setColorSpace(Color color) {        int type = ExtendedColor.getType(color);        PdfObject colorSpace = null;        switch (type) {            case ExtendedColor.TYPE_GRAY: {                colorSpace = PdfName.DEVICEGRAY;                break;            }            case ExtendedColor.TYPE_CMYK: {                colorSpace = PdfName.DEVICECMYK;                break;            }            case ExtendedColor.TYPE_SEPARATION: {                SpotColor spot = (SpotColor)color;                colorDetails = writer.addSimple(spot.getPdfSpotColor());                colorSpace = colorDetails.getIndirectReference();                break;            }            case ExtendedColor.TYPE_PATTERN:            case ExtendedColor.TYPE_SHADING: {                throwColorSpaceError();            }            default:                colorSpace = PdfName.DEVICERGB;                break;        }        shading.put(PdfName.COLORSPACE, colorSpace);    }        public static void throwColorSpaceError() {        throw new IllegalArgumentException("A tiling or shading pattern cannot be used as a color space in a shading pattern");    }        public static void checkCompatibleColors(Color c1, Color c2) {        int type1 = ExtendedColor.getType(c1);        int type2 = ExtendedColor.getType(c2);        if (type1 != type2)            throw new IllegalArgumentException("Both colors must be of the same type.");        if (type1 == ExtendedColor.TYPE_SEPARATION && ((SpotColor)c1).getPdfSpotColor() != ((SpotColor)c2).getPdfSpotColor())            throw new IllegalArgumentException("The spot color must be the same, only the tint can vary.");        if (type1 == ExtendedColor.TYPE_PATTERN || type1 == ExtendedColor.TYPE_SHADING)            throwColorSpaceError();    }        public static float[] getColorArray(Color color) {        int type = ExtendedColor.getType(color);        switch (type) {            case ExtendedColor.TYPE_GRAY: {                return new float[]{((GrayColor)color).getGray()};            }            case ExtendedColor.TYPE_CMYK: {                CMYKColor cmyk = (CMYKColor)color;                return new float[]{cmyk.getCyan(), cmyk.getMagenta(), cmyk.getYellow(), cmyk.getBlack()};            }            case ExtendedColor.TYPE_SEPARATION: {                return new float[]{((SpotColor)color).getTint()};            }            case ExtendedColor.TYPE_RGB: {                return new float[]{color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f};            }        }        throwColorSpaceError();        return null;    }    public static PdfShading type1(PdfWriter writer, Color colorSpace, float domain[], float tMatrix[], PdfFunction function) {        PdfShading sp = new PdfShading(writer);        sp.shading = new PdfDictionary();        sp.shadingType = 1;        sp.shading.put(PdfName.SHADINGTYPE, new PdfNumber(sp.shadingType));        sp.setColorSpace(colorSpace);        if (domain != null)            sp.shading.put(PdfName.DOMAIN, new PdfArray(domain));        if (tMatrix != null)            sp.shading.put(PdfName.MATRIX, new PdfArray(tMatrix));        sp.shading.put(PdfName.FUNCTION, function.getReference());        return sp;    }        public static PdfShading type2(PdfWriter writer, Color colorSpace, float coords[], float domain[], PdfFunction function, boolean extend[]) {        PdfShading sp = new PdfShading(writer);        sp.shading = new PdfDictionary();        sp.shadingType = 2;        sp.shading.put(PdfName.SHADINGTYPE, new PdfNumber(sp.shadingType));        sp.setColorSpace(colorSpace);        sp.shading.put(PdfName.COORDS, new PdfArray(coords));        if (domain != null)            sp.shading.put(PdfName.DOMAIN, new PdfArray(domain));        sp.shading.put(PdfName.FUNCTION, function.getReference());        if (extend != null && (extend[0] || extend[1])) {            PdfArray array = new PdfArray(extend[0] ? PdfBoolean.PDFTRUE : PdfBoolean.PDFFALSE);            array.add(extend[1] ? PdfBoolean.PDFTRUE : PdfBoolean.PDFFALSE);            sp.shading.put(PdfName.EXTEND, array);        }        return sp;    }    public static PdfShading type3(PdfWriter writer, Color colorSpace, float coords[], float domain[], PdfFunction function, boolean extend[]) {        PdfShading sp = type2(writer, colorSpace, coords, domain, function, extend);        sp.shadingType = 3;        sp.shading.put(PdfName.SHADINGTYPE, new PdfNumber(sp.shadingType));        return sp;    }        public static PdfShading simpleAxial(PdfWriter writer, float x0, float y0, float x1, float y1, Color startColor, Color endColor, boolean extendStart, boolean extendEnd) {        checkCompatibleColors(startColor, endColor);        PdfFunction function = PdfFunction.type2(writer, new float[]{0, 1}, null, getColorArray(startColor),            getColorArray(endColor), 1);        return type2(writer, startColor, new float[]{x0, y0, x1, y1}, null, function, new boolean[]{extendStart, extendEnd});    }        public static PdfShading simpleAxial(PdfWriter writer, float x0, float y0, float x1, float y1, Color startColor, Color endColor) {        return simpleAxial(writer, x0, y0, x1, y1, startColor, endColor, true, true);    }        public static PdfShading simpleRadial(PdfWriter writer, float x0, float y0, float r0, float x1, float y1, float r1, Color startColor, Color endColor, boolean extendStart, boolean extendEnd) {        checkCompatibleColors(startColor, endColor);        PdfFunction function = PdfFunction.type2(writer, new float[]{0, 1}, null, getColorArray(startColor),            getColorArray(endColor), 1);        return type3(writer, startColor, new float[]{x0, y0, r0, x1, y1, r1}, null, function, new boolean[]{extendStart, extendEnd});    }    public static PdfShading simpleRadial(PdfWriter writer, float x0, float y0, float r0, float x1, float y1, float r1, Color startColor, Color endColor) {        return simpleRadial(writer, x0, y0, r0, x1, y1, r1, startColor, endColor, true, true);    }    PdfName getShadingName() {        return shadingName;    }        PdfIndirectReference getShadingReference() {        if (shadingReference == null)            shadingReference = writer.getPdfIndirectReference();        return shadingReference;    }        void setName(int number) {        shadingName = new PdfName("Sh" + number);    }        void addToBody() throws IOException {        if (bBox != null)            shading.put(PdfName.BBOX, new PdfArray(bBox));        if (antiAlias)            shading.put(PdfName.ANTIALIAS, PdfBoolean.PDFTRUE);        writer.addToBody(shading, getShadingReference());    }        PdfWriter getWriter() {        return writer;    }        ColorDetails getColorDetails() {        return colorDetails;    }        public float[] getBBox() {        return bBox;    }        public void setBBox(float[] bBox) {        if (bBox.length != 4)            throw new IllegalArgumentException("BBox must be a 4 element array.");        this.bBox = bBox;    }        public boolean isAntiAlias() {        return antiAlias;    }        public void setAntiAlias(boolean antiAlias) {        this.antiAlias = antiAlias;    }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区精品在线视频| 久久久久国产一区二区三区四区| 国产成人精品三级麻豆| 香蕉成人伊视频在线观看| 中文字幕欧美一| 亚洲美女区一区| 天堂精品中文字幕在线| 一区二区三区在线视频观看| 亚洲免费成人av| 亚洲综合视频网| 亚洲三级电影网站| 一区二区三区国产精品| 亚洲国产欧美日韩另类综合| 欧美理论电影在线| 久久夜色精品国产欧美乱极品| 亚洲视频你懂的| 国产成人精品影视| 91精品国产品国语在线不卡| 国产欧美日韩卡一| 五月天一区二区三区| 波多野结衣中文一区| 欧美狂野另类xxxxoooo| 亚洲欧美在线视频| 国产一区在线精品| 在线播放欧美女士性生活| 中文字幕佐山爱一区二区免费| 爽爽淫人综合网网站| 91蜜桃在线免费视频| 久久久91精品国产一区二区精品 | 欧美日韩在线精品一区二区三区激情| 欧美性生活影院| 中文字幕在线不卡| 成人av在线网站| 日韩欧美在线123| 亚洲久本草在线中文字幕| 美女脱光内衣内裤视频久久影院| 成人激情电影免费在线观看| 精品毛片乱码1区2区3区| 亚洲三级小视频| 国产福利电影一区二区三区| 欧美一级一区二区| 蜜臀久久99精品久久久久宅男| 国产成人亚洲精品狼色在线| 久久久久久久久久久久久夜| 精品亚洲成av人在线观看| 日韩欧美精品在线| 成人黄页在线观看| 亚洲黄色片在线观看| 欧美日韩在线不卡| 国产老妇另类xxxxx| 国产喷白浆一区二区三区| 国产精品99久久久久| 亚洲欧美日韩一区二区三区在线观看| 欧美久久久久久久久| 国产精品一区二区x88av| 亚洲精品免费电影| 国产欧美一区二区三区网站| 欧美影视一区在线| 国产寡妇亲子伦一区二区| 亚洲日本在线看| 国产视频不卡一区| 欧洲精品一区二区| 激情av综合网| 日韩黄色在线观看| 亚洲丶国产丶欧美一区二区三区| 日韩精品最新网址| 日韩午夜在线播放| 欧美唯美清纯偷拍| 色综合中文字幕国产| 成人午夜激情片| 成人理论电影网| av一二三不卡影片| 972aa.com艺术欧美| 欧美少妇性性性| 91福利在线观看| 99re这里只有精品6| 精品无人区卡一卡二卡三乱码免费卡| 亚洲人成网站精品片在线观看| 国产精品久久久久久久久免费桃花 | 亚洲天堂av一区| 一区二区三区.www| 亚洲综合在线五月| 亚洲自拍欧美精品| 日本人妖一区二区| 成人av电影在线网| 欧美日韩亚洲丝袜制服| 欧美一卡二卡在线观看| 欧美不卡视频一区| 亚洲国产成人午夜在线一区| 一区二区三区丝袜| 日韩高清不卡在线| 成人高清免费观看| 欧美私模裸体表演在线观看| 精品国产乱码久久久久久老虎| 久久久久国产精品厨房| 亚洲精品日日夜夜| 日韩av一区二区三区| 精品一区二区三区免费毛片爱| 国产呦精品一区二区三区网站| 不卡影院免费观看| 欧美性猛片aaaaaaa做受| 日韩一级免费观看| 一区二区在线看| 婷婷国产v国产偷v亚洲高清| 视频一区视频二区在线观看| 国产乱子伦一区二区三区国色天香| 99久久99精品久久久久久| 日韩精品中文字幕在线一区| 国产精品国产三级国产有无不卡 | 国产精品99久久不卡二区| 日韩欧美国产综合在线一区二区三区| 国产精品午夜在线| 国产99精品国产| 国产精品午夜春色av| 国产精品一区2区| 精品美女一区二区| 国产精品一卡二卡| 国产日韩欧美综合在线| 粉嫩av亚洲一区二区图片| 亚洲国产精品高清| 欧美日韩国产不卡| 日韩激情视频网站| 国产日韩v精品一区二区| av电影一区二区| 亚州成人在线电影| 久久综合色婷婷| 精品视频1区2区| 美女性感视频久久| 亚洲线精品一区二区三区八戒| 精品国产乱子伦一区| 欧美在线播放高清精品| 国产精品资源在线观看| 亚洲精品菠萝久久久久久久| 91精品国产综合久久久久久漫画| 麻豆免费精品视频| 亚洲一区二区在线播放相泽| 国产人久久人人人人爽| 91精品国产黑色紧身裤美女| 99国产精品久久| 夫妻av一区二区| 国产精品主播直播| 理论电影国产精品| 香蕉av福利精品导航| 国产亚洲人成网站| 欧美色窝79yyyycom| 成人黄色电影在线| 久久精品国产999大香线蕉| 亚洲品质自拍视频| 久久亚洲欧美国产精品乐播| 欧美一三区三区四区免费在线看| 国产成人h网站| 国产一区二区导航在线播放| 美女精品一区二区| 久热成人在线视频| 另类中文字幕网| 经典一区二区三区| 日韩—二三区免费观看av| 久久蜜臀精品av| 日韩欧美亚洲一区二区| 日韩一区二区电影| 久久丝袜美腿综合| 一区二区三区免费观看| 免费看欧美美女黄的网站| 日韩一区欧美二区| 美女网站色91| 国产精品一区二区男女羞羞无遮挡 | 久久99九九99精品| 亚洲成a人片在线不卡一二三区| 国产精品久久夜| 亚洲免费伊人电影| 日韩电影一区二区三区四区| 成人av影视在线观看| 欧美日韩国产首页| 国产欧美一区二区三区网站| 亚洲欧美偷拍卡通变态| 国产精一品亚洲二区在线视频| www.av亚洲| 欧美tk—视频vk| 亚洲主播在线观看| 精品中文字幕一区二区| 99国产精品久久久| 精品精品国产高清a毛片牛牛| 亚洲精品免费在线| 国内成人精品2018免费看| 欧美亚洲国产一区二区三区va| 精品免费视频.| 性欧美疯狂xxxxbbbb| 欧美日韩亚洲综合一区二区三区| 久久久综合视频| 日韩精品一级中文字幕精品视频免费观看 | 国产寡妇亲子伦一区二区| 欧美美女bb生活片| 亚洲成在线观看| 在线观看av一区二区| 亚洲精品视频免费观看| 欧美精品第1页| 蜜臀av性久久久久蜜臀aⅴ| 日韩欧美电影一二三| 久久国产综合精品| 久久久久久夜精品精品免费|