public class ImageRenderInfo extends AbstractRenderInfo
gs
Constructor and Description |
---|
ImageRenderInfo(Stack<CanvasTag> canvasTagHierarchy, CanvasGraphicsState gs, Matrix ctm, PdfStream imageStream, PdfName resourceName, PdfDictionary colorSpaceDictionary, boolean isInline)
Creates an ImageRenderInfo.
|
Modifier and Type | Method and Description |
---|---|
float |
getArea()
Gets the size of the image in User space units.
|
List<CanvasTag> |
getCanvasTagHierarchy()
Gets hierarchy of the canvas tags that wraps given text.
|
PdfDictionary |
getColorSpaceDictionary()
Gets the color space dictionary of the image.
|
PdfImageXObject |
getImage()
Gets the image wrapped in ImageXObject.
|
Matrix |
getImageCtm()
Gets the coordinate transformation matrix in User space which was active when this image was rendered.
|
PdfName |
getImageResourceName()
Gets the name of the image resource.
|
int |
getMcid()
Gets the marked-content identifier associated with this ImageRenderInfo instance
|
Vector |
getStartPoint()
Gets the vector in User space representing the start point of the image.
|
boolean |
hasMcid(int mcid)
Checks if the text belongs to a marked content sequence with a given mcid.
|
boolean |
hasMcid(int mcid, boolean checkTheTopmostLevelOnly)
Checks if the text belongs to a marked content sequence with a given mcid.
|
boolean |
isInline()
Gets the inline flag.
|
checkGraphicsState, getGraphicsState, isGraphicsStatePreserved, preserveGraphicsState, releaseGraphicsState
public ImageRenderInfo(Stack<CanvasTag> canvasTagHierarchy, CanvasGraphicsState gs, Matrix ctm, PdfStream imageStream, PdfName resourceName, PdfDictionary colorSpaceDictionary, boolean isInline)
canvasTagHierarchy
- the hierarchy of nested canvas tags for the text from the most inner (nearest to text) tag to the most outer
gs
- the canvas graphics state
ctm
- the coordinate transformation matrix at the time the image is rendered
imageStream
- the image stream object
resourceName
- the name
of the image resource
colorSpaceDictionary
- the color space dictionary from resources which are associated with the image
isInline
- defines if the encountered image was inline
public PdfImageXObject getImage()
PdfImageXObject.getImageBytes(boolean)
, these image bytes represent native image, i.e you can write these bytes to disk and get just an usual image; PdfObjectWrapper.getPdfObject()
method; BufferedImage
with PdfImageXObject.getBufferedImage()
; image
public PdfName getImageResourceName()
name
of the image resource
public Vector getStartPoint()
vector
in User space representing the start point of the image
public Matrix getImageCtm()
public float getArea()
public boolean isInline()
true
if image was inlined in original stream
public PdfDictionary getColorSpaceDictionary()
public List<CanvasTag> getCanvasTagHierarchy()
public int getMcid()
ImageRenderInfo
instance
public boolean hasMcid(int mcid)
mcid
- a marked content id
public boolean hasMcid(int mcid, boolean checkTheTopmostLevelOnly)
mcid
- a marked content id
checkTheTopmostLevelOnly
- indicates whether to check the topmost level of marked content stack only
Copyright © 1998–2022 iText Group NV. All rights reserved.