本文整理了Java中com.itextpdf.text.Image.hasAbsoluteY()
方法的一些代码示例,展示了Image.hasAbsoluteY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Image.hasAbsoluteY()
方法的具体详情如下:
包路径:com.itextpdf.text.Image
类名称:Image
方法名:hasAbsoluteY
[英]Checks if the Images
has to be added at an absolute position.
[中]
代码示例来源:origin: com.itextpdf/itextpdf
/**
* Adds an <CODE>Image</CODE> to the page. The <CODE>Image</CODE> must have
* absolute positioning. The image can be placed inline.
* @param image the <CODE>Image</CODE> object
* @param inlineImage <CODE>true</CODE> to place this image inline, <CODE>false</CODE> otherwise
* @throws DocumentException if the <CODE>Image</CODE> does not have absolute positioning
*/
public void addImage(final Image image, final boolean inlineImage) throws DocumentException {
if (!image.hasAbsoluteY())
throw new DocumentException(MessageLocalization.getComposedMessage("the.image.must.have.absolute.positioning"));
float matrix[] = image.matrix();
matrix[Image.CX] = image.getAbsoluteX() - matrix[Image.CX];
matrix[Image.CY] = image.getAbsoluteY() - matrix[Image.CY];
addImage(image, matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5], inlineImage);
}
代码示例来源:origin: com.itextpdf/itextg
/**
* Adds an <CODE>Image</CODE> to the page. The <CODE>Image</CODE> must have
* absolute positioning. The image can be placed inline.
* @param image the <CODE>Image</CODE> object
* @param inlineImage <CODE>true</CODE> to place this image inline, <CODE>false</CODE> otherwise
* @throws DocumentException if the <CODE>Image</CODE> does not have absolute positioning
*/
public void addImage(final Image image, final boolean inlineImage) throws DocumentException {
if (!image.hasAbsoluteY())
throw new DocumentException(MessageLocalization.getComposedMessage("the.image.must.have.absolute.positioning"));
float matrix[] = image.matrix();
matrix[Image.CX] = image.getAbsoluteX() - matrix[Image.CX];
matrix[Image.CY] = image.getAbsoluteY() - matrix[Image.CY];
addImage(image, matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5], inlineImage);
}
代码示例来源:origin: com.itextpdf/itextg
if (image.hasAbsoluteY()) {
graphics.addImage(image);
pageEmpty = false;
代码示例来源:origin: com.itextpdf/itextpdf
if (image.hasAbsoluteY()) {
graphics.addImage(image);
pageEmpty = false;
内容来源于网络,如有侵权,请联系作者删除!