public class Image extends AbstractComponent
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-pdfbox is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
Modifier and Type | Field and Description |
---|---|
protected Float |
alpha
透明度
|
protected Float |
angle
旋转角度
|
protected Integer |
height
高度
|
protected org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject |
image
pdfbox图像对象
|
protected Float |
scale
缩放比例
|
protected Integer |
width
宽度
|
beginX, beginY, borderConfiguration, horizontalAlignment, isBreak, isCustomPosition, isWrap, marginConfiguration, pagingCondition, pagingEvents, relativeBeginX, relativeBeginY, verticalAlignment
contentMode, context, isResetContentStream, log
Modifier and Type | Method and Description |
---|---|
protected float |
getMinWidth()
获取最小宽度
|
ComponentType |
getType()
获取类型
|
protected void |
init()
初始化
|
protected void |
initWidthAndHeight()
初始化宽度与高度
|
protected void |
reset()
重置
|
void |
setHeight(int height)
设置高度
|
void |
setImage(BufferedImage image)
设置图片
|
void |
setImage(byte[] bytes)
设置图片
|
void |
setImage(File file)
设置图片
|
void |
setImage(InputStream inputStream)
设置图片
|
void |
setWidth(int width)
设置宽度
|
protected void |
writeContents()
写入内容
|
addPagingEvent, checkPaging, checkPaging, checkPaging, checkWrap, close, executeBreak, getBase, getBorderBottomColor, getBorderDottedSpacing, getBorderLeftColor, getBorderLineCapStyle, getBorderLineLength, getBorderLineStyle, getBorderLineWidth, getBorderRightColor, getBorderTopColor, getBottom, getIsBorderBottom, getIsBorderLeft, getIsBorderRight, getIsBorderTop, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPage, initBeginX, initBeginXY, initBeginY, initBeginYForPaging, isNeedWrap, isPaging, isPagingComponent, isWrap, processBreak, render, reset, resetXY, setBeginX, setBeginX, setBeginY, setBeginY, setBorderBottomColor, setBorderColor, setBorderDottedSpacing, setBorderLeftColor, setBorderLineCapStyle, setBorderLineLength, setBorderLineStyle, setBorderLineWidth, setBorderRightColor, setBorderRightColor, setBorderTopColor, setIsBorder, setIsBorderBottom, setIsBorderLeft, setIsBorderRight, setIsBorderTop, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, virtualRender, wrap
init, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext, getPagingCondition, getPagingEvents, setHorizontalAlignment, setVerticalAlignment
protected org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject image
protected Integer width
protected Integer height
protected Float angle
protected Float alpha
protected Float scale
public Image(Page page)
page
- 页面public void setWidth(int width)
width
- 宽度public void setHeight(int height)
height
- 高度public void setImage(File file)
file
- 文件public void setImage(BufferedImage image)
image
- 图片public void setImage(InputStream inputStream)
inputStream
- 输入流public void setImage(byte[] bytes)
bytes
- 字节数组public ComponentType getType()
protected void init()
init
in class AbstractComponent
protected void initWidthAndHeight()
protected float getMinWidth()
getMinWidth
in class AbstractComponent
protected void writeContents()
writeContents
in class AbstractComponent
protected void reset()
reset
in class AbstractComponent
Copyright © 2024. All rights reserved.