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

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

?? pdfprow.java

?? 源碼包含生成 PDF 和 HTML 的類庫
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Id: PdfPRow.java 3560 2008-07-14 10:31:32Z blowagie $ * * Copyright 2001, 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 com.lowagie.text.DocumentException;import com.lowagie.text.Element;import com.lowagie.text.ExceptionConverter;import com.lowagie.text.Image;import com.lowagie.text.Rectangle;/** * A row in a PdfPTable. *  * @author Paulo Soares (psoares@consiste.pt) */public class PdfPRow {	/** the bottom limit (bottom right y) */	public static final float BOTTOM_LIMIT = -(1 << 30);	protected PdfPCell cells[];	protected float widths[];	protected float maxHeight = 0;	protected boolean calculated = false;        private int[] canvasesPos;	/**	 * Constructs a new PdfPRow with the cells in the array that was passed as a parameter.	 * @param cells	 */	public PdfPRow(PdfPCell cells[]) {		this.cells = cells;		widths = new float[cells.length];	}	/**	 * Makes a copy of an existing row.	 * @param row	 */	public PdfPRow(PdfPRow row) {		maxHeight = row.maxHeight;		calculated = row.calculated;		cells = new PdfPCell[row.cells.length];		for (int k = 0; k < cells.length; ++k) {			if (row.cells[k] != null)				cells[k] = new PdfPCell(row.cells[k]);		}		widths = new float[cells.length];		System.arraycopy(row.widths, 0, widths, 0, cells.length);	}	/**	 * Sets the widths of the columns in the row.	 * @param widths	 * @return true if everything went right	 */	public boolean setWidths(float widths[]) {		if (widths.length != cells.length)			return false;		System.arraycopy(widths, 0, this.widths, 0, cells.length);		float total = 0;		calculated = false;		for (int k = 0; k < widths.length; ++k) {			PdfPCell cell = cells[k];			cell.setLeft(total);			int last = k + cell.getColspan();			for (; k < last; ++k)				total += widths[k];			--k;			cell.setRight(total);			cell.setTop(0);		}		return true;	}	/**	 * Calculates the heights of each cell in the row.	 * @return the maximum height of the row.	 */	public float calculateHeights() {		maxHeight = 0;		for (int k = 0; k < cells.length; ++k) {			PdfPCell cell = cells[k];			if (cell == null)				continue;			Image img = cell.getImage();			if (img != null) {				img.scalePercent(100);                float refWidth = img.getScaledWidth();                if (cell.getRotation() == 90 || cell.getRotation() == 270) {                    refWidth = img.getScaledHeight();                }                float scale = (cell.getRight() - cell.getEffectivePaddingRight()                    - cell.getEffectivePaddingLeft() - cell.getLeft())                    / refWidth;                img.scalePercent(scale * 100);                float refHeight = img.getScaledHeight();                if (cell.getRotation() == 90 || cell.getRotation() == 270) {                    refHeight = img.getScaledWidth();                }                cell.setBottom(cell.getTop() - cell.getEffectivePaddingTop()                    - cell.getEffectivePaddingBottom()                    - refHeight);			} else {                if (cell.getRotation() == 0 || cell.getRotation() == 180) {                    float rightLimit = cell.isNoWrap() ? 20000 : cell.getRight()                            - cell.getEffectivePaddingRight();                    float bry = (cell.getFixedHeight() > 0) ? cell.getTop()                            - cell.getEffectivePaddingTop()                            + cell.getEffectivePaddingBottom()                            - cell.getFixedHeight() : BOTTOM_LIMIT;                    ColumnText ct = ColumnText.duplicate(cell.getColumn());                    setColumn(ct,                            cell.getLeft() + cell.getEffectivePaddingLeft(), bry,                            rightLimit, cell.getTop() - cell.getEffectivePaddingTop());                    try {                        ct.go(true);                    } catch (DocumentException e) {                        throw new ExceptionConverter(e);                    }                    float yLine = ct.getYLine();                    if (cell.isUseDescender())                        yLine += ct.getDescender();                    cell.setBottom(yLine - cell.getEffectivePaddingBottom());                }                else {                    if (cell.getFixedHeight() > 0) {                        cell.setBottom(cell.getTop() - cell.getFixedHeight());                    }                    else {                        ColumnText ct = ColumnText.duplicate(cell.getColumn());                        setColumn(ct, 0, cell.getLeft() + cell.getEffectivePaddingLeft(),                                20000, cell.getRight() - cell.getEffectivePaddingRight());                        try {                            ct.go(true);                        } catch (DocumentException e) {                            throw new ExceptionConverter(e);                        }                        cell.setBottom(cell.getTop() - cell.getEffectivePaddingTop()                             - cell.getEffectivePaddingBottom() - ct.getFilledWidth());                    }                }			}			float height = cell.getFixedHeight();			if (height <= 0)				height = cell.getHeight();			if (height < cell.getFixedHeight())				height = cell.getFixedHeight();			else if (height < cell.getMinimumHeight())				height = cell.getMinimumHeight();			if (height > maxHeight)				maxHeight = height;		}		calculated = true;		return maxHeight;	}	/**	 * Writes the border and background of one cell in the row.	 * @param xPos	 * @param yPos	 * @param cell	 * @param canvases	 */	public void writeBorderAndBackground(float xPos, float yPos, PdfPCell cell,			PdfContentByte[] canvases) {		PdfContentByte lines = canvases[PdfPTable.LINECANVAS];		PdfContentByte backgr = canvases[PdfPTable.BACKGROUNDCANVAS];		// the coordinates of the border are retrieved		float x1 = cell.getLeft() + xPos;		float y2 = cell.getTop() + yPos;		float x2 = cell.getRight() + xPos;		float y1 = y2 - maxHeight;		// the backgroundcolor is set		Color background = cell.getBackgroundColor();		if (background != null) {			backgr.setColorFill(background);			backgr.rectangle(x1, y1, x2 - x1, y2 - y1);			backgr.fill();        }		// if the element hasn't got any borders, nothing is added		if (cell.hasBorders()) {			if (cell.isUseVariableBorders()) {				Rectangle borderRect = new Rectangle(cell.getLeft() + xPos, cell						.getTop()						- maxHeight + yPos, cell.getRight() + xPos, cell.getTop()						+ yPos);				borderRect.cloneNonPositionParameters(cell);                borderRect.setBackgroundColor(null);				lines.rectangle(borderRect);			} else {				// the width is set to the width of the element				if (cell.getBorderWidth() != Rectangle.UNDEFINED) {					lines.setLineWidth(cell.getBorderWidth());				}				// the color is set to the color of the element				Color color = cell.getBorderColor();				if (color != null) {					lines.setColorStroke(color);				}				// if the box is a rectangle, it is added as a rectangle				if (cell.hasBorder(Rectangle.BOX)) {					lines.rectangle(x1, y1, x2 - x1, y2 - y1);				}				// if the border isn't a rectangle, the different sides are				// added apart				else {					if (cell.hasBorder(Rectangle.RIGHT)) {						lines.moveTo(x2, y1);						lines.lineTo(x2, y2);					}					if (cell.hasBorder(Rectangle.LEFT)) {						lines.moveTo(x1, y1);						lines.lineTo(x1, y2);					}					if (cell.hasBorder(Rectangle.BOTTOM)) {						lines.moveTo(x1, y1);						lines.lineTo(x2, y1);					}					if (cell.hasBorder(Rectangle.TOP)) {						lines.moveTo(x1, y2);						lines.lineTo(x2, y2);					}				}				lines.stroke();				if (color != null) {					lines.resetRGBColorStroke();				}			}		}	}    private void saveAndRotateCanvases(PdfContentByte[] canvases, float a, float b, float c, float d, float e, float f) {        int last = PdfPTable.TEXTCANVAS + 1;        if (canvasesPos == null) {            canvasesPos = new int[last * 2];        }        for (int k = 0; k < last; ++k) {            ByteBuffer bb = canvases[k].getInternalBuffer();            canvasesPos[k * 2] = bb.size();            canvases[k].saveState();            canvases[k].concatCTM(a, b, c, d, e, f);            canvasesPos[k * 2 + 1] = bb.size();        }    }        private void restoreCanvases(PdfContentByte[] canvases) {        int last = PdfPTable.TEXTCANVAS + 1;        for (int k = 0; k < last; ++k) {            ByteBuffer bb = canvases[k].getInternalBuffer();            int p1 = bb.size();            canvases[k].restoreState();            if (p1 == canvasesPos[k * 2 + 1])                bb.setSize(canvasesPos[k * 2]);        }    }        private float setColumn(ColumnText ct, float llx, float lly, float urx, float ury) {        if (llx > urx)            urx = llx;        if (lly > ury)            ury = lly;        ct.setSimpleColumn(llx, lly, urx, ury);        return ury;    }    	/**	 * Writes a number of cells (not necessarily all cells).	 * @param colStart	 * @param colEnd	 * @param xPos	 * @param yPos	 * @param canvases	 */	public void writeCells(int colStart, int colEnd, float xPos, float yPos,			PdfContentByte[] canvases) {		if (!calculated)			calculateHeights();		if (colEnd < 0)			colEnd = cells.length;		colEnd = Math.min(colEnd, cells.length);		if (colStart < 0)			colStart = 0;		if (colStart >= colEnd)			return;		int newStart;		for (newStart = colStart; newStart >= 0; --newStart) {			if (cells[newStart] != null)				break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品99国产精品| 亚洲一区二区三区激情| 欧美日韩成人综合天天影院 | 精品欧美久久久| 91麻豆精品91久久久久久清纯| 色综合中文字幕国产| 一本大道av伊人久久综合| 国产乱人伦精品一区二区在线观看 | 亚洲精品v日韩精品| 中文字幕一区免费在线观看| 国产精品美女www爽爽爽| 国产精品毛片a∨一区二区三区| 久久精品欧美日韩| 国产欧美日韩精品a在线观看| 欧美激情在线观看视频免费| 国产精品乱子久久久久| 国产亚洲午夜高清国产拍精品| 精品成人一区二区三区四区| 久久婷婷一区二区三区| 亚洲欧洲精品一区二区三区 | 91福利社在线观看| 在线看国产一区二区| 在线亚洲欧美专区二区| 欧美美女bb生活片| 久久综合色天天久久综合图片| 久久精品欧美日韩| 一区二区三区成人| 捆绑紧缚一区二区三区视频| 国产成人在线影院| 91行情网站电视在线观看高清版| 欧美日韩视频在线第一区 | 天堂在线一区二区| 久久国产免费看| av成人动漫在线观看| 欧美日韩久久久久久| 精品女同一区二区| 亚洲美女免费视频| 免费日韩伦理电影| voyeur盗摄精品| 在线播放欧美女士性生活| 久久久久久电影| 亚洲大片免费看| 国产成人在线网站| 7777女厕盗摄久久久| 中文字幕免费不卡在线| 亚洲高清在线视频| 国产一区二区成人久久免费影院| 在线观看欧美黄色| 久久久久久日产精品| 亚洲国产一区二区三区青草影视| 国产一区视频网站| 欧美区视频在线观看| 国产精品国产三级国产普通话三级| 亚洲成a人片在线不卡一二三区| 国产成人精品亚洲777人妖 | 日韩黄色在线观看| a美女胸又www黄视频久久| 欧美一级电影网站| 亚洲国产一二三| 99re热这里只有精品免费视频| 欧美成人国产一区二区| 午夜欧美2019年伦理| 色综合久久天天| 国产欧美日韩卡一| 国产精品亚洲专一区二区三区| 在线成人av影院| 亚洲大型综合色站| 91丝袜美女网| 亚洲欧洲色图综合| 成人综合激情网| 国产婷婷色一区二区三区 | 欧美成人免费网站| 亚洲成人精品影院| 在线观看亚洲专区| 一区二区三区国产精华| 91黄色免费观看| 一区二区三区影院| 91麻豆福利精品推荐| 国产精品成人免费精品自在线观看| 精品一区二区免费视频| 日韩免费观看高清完整版在线观看| 亚洲国产成人porn| 欧美日韩国产另类一区| 亚洲不卡av一区二区三区| 欧美午夜精品久久久久久超碰 | 91蜜桃网址入口| 亚洲视频网在线直播| 色综合一个色综合亚洲| 亚洲品质自拍视频| 色美美综合视频| 亚洲午夜久久久久久久久久久| 欧美日韩一区二区三区四区五区| 亚洲成人你懂的| 日韩久久精品一区| 高清久久久久久| 国产精品福利电影一区二区三区四区| 99综合电影在线视频| 亚洲黄色免费电影| 欧美猛男男办公室激情| 麻豆精品视频在线观看视频| 精品国产青草久久久久福利| 国产成人啪免费观看软件| 中文字幕一区在线观看视频| 欧美日韩在线精品一区二区三区激情| 亚洲成人先锋电影| 久久综合九色综合欧美亚洲| 北条麻妃国产九九精品视频| 亚洲第一精品在线| 久久伊人蜜桃av一区二区| 99久久国产免费看| 亚洲 欧美综合在线网络| 精品va天堂亚洲国产| av一区二区三区| 日韩精品乱码免费| 中文字幕av不卡| 欧美性videosxxxxx| 激情深爱一区二区| 一区二区三区日韩精品视频| 精品欧美一区二区在线观看| k8久久久一区二区三区| 日韩高清不卡一区| 国产精品久久久久久久浪潮网站| 欧美精品日韩一本| 成人网在线免费视频| 日本人妖一区二区| 一色屋精品亚洲香蕉网站| 欧美一区二区三区在线电影| 99精品视频在线观看| 麻豆精品国产传媒mv男同| 亚洲视频一区二区在线观看| 精品国产乱码久久久久久老虎 | 亚洲综合小说图片| 国产婷婷色一区二区三区四区| 欧美美女激情18p| 91网站在线播放| 高清不卡在线观看| 免费成人在线观看视频| 亚洲一区二三区| 国产精品久久久久天堂| 久久久久免费观看| 欧美一区二区观看视频| 欧美午夜理伦三级在线观看| 成人黄动漫网站免费app| 老司机午夜精品99久久| 天天综合网 天天综合色| 亚洲精品乱码久久久久久黑人| 国产欧美一区二区三区网站| 精品久久久久一区| 91精品黄色片免费大全| 欧美日韩一区二区三区在线| 一本大道久久a久久综合| a在线欧美一区| 成人av在线一区二区| 国产91富婆露脸刺激对白| 久久成人久久爱| 国产真实精品久久二三区| 老司机免费视频一区二区三区| 奇米色一区二区| 日本sm残虐另类| 蜜臀av一区二区| 久久av资源网| 精品制服美女久久| 国产一区二区主播在线| 韩国一区二区在线观看| 韩国一区二区视频| 国产精品一区二区你懂的| 国产成人综合视频| 成人av在线资源网| 91首页免费视频| 91久久精品一区二区二区| 欧美午夜精品久久久久久孕妇| 欧美日韩情趣电影| 日韩女优毛片在线| 国产日韩综合av| 亚洲欧美成人一区二区三区| 亚洲成精国产精品女| 日韩av电影天堂| 国产一区不卡视频| 97精品国产露脸对白| 欧洲一区二区三区免费视频| 欧美久久久影院| 久久久久88色偷偷免费| 国产精品久久一卡二卡| 亚洲专区一二三| 久久福利视频一区二区| youjizz久久| 欧美肥妇bbw| 亚洲国产精品ⅴa在线观看| 亚洲欧美日韩久久| 免费观看91视频大全| 国产成人精品免费| 欧美怡红院视频| 日韩精品一区二区三区swag | 国产性天天综合网| 一区二区三国产精华液| 国模一区二区三区白浆 | 亚洲成人777| 成人爽a毛片一区二区免费| 欧美调教femdomvk| 国产欧美日韩视频在线观看|