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 outergs
- the canvas graphics state
ctm
- the coordinate transformation matrix at the time the image is renderedimageStream
- the image stream objectresourceName
- the name
of the image resourcecolorSpaceDictionary
- the color space dictionary from resources which are associated with the imageisInline
- defines if the encountered image was inlinepublic 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 resourcepublic Vector getStartPoint()
vector
in User space representing the start point of the imagepublic Matrix getImageCtm()
public float getArea()
public boolean isInline()
true
if image was inlined in original streampublic PdfDictionary getColorSpaceDictionary()
public List<CanvasTag> getCanvasTagHierarchy()
public int getMcid()
ImageRenderInfo
instancepublic boolean hasMcid(int mcid)
mcid
- a marked content idpublic boolean hasMcid(int mcid, boolean checkTheTopmostLevelOnly)
mcid
- a marked content idcheckTheTopmostLevelOnly
- indicates whether to check the topmost level of marked content stack onlyCopyright © 1998–2023 Apryse Group NV. All rights reserved.