Package com.openhtmltopdf.pdfboxout
Class PdfBoxImageElement
- java.lang.Object
-
- com.openhtmltopdf.pdfboxout.PdfBoxImageElement
-
- All Implemented Interfaces:
ReplacedElement
,PdfBoxLinkManager.IPdfBoxElementWithShapedLinks
,PdfBoxReplacedElement
public class PdfBoxImageElement extends java.lang.Object implements PdfBoxReplacedElement, PdfBoxLinkManager.IPdfBoxElementWithShapedLinks
-
-
Field Summary
Fields Modifier and Type Field Description private FSImage
_image
private java.awt.Point
_location
private java.util.Map<java.awt.Shape,java.lang.String>
imageMap
private boolean
interpolate
-
Constructor Summary
Constructors Constructor Description PdfBoxImageElement(org.w3c.dom.Element e, FSImage image, SharedContext c, boolean interpolate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detach(LayoutContext c)
int
getBaseline()
FSImage
getImage()
int
getIntrinsicHeight()
int
getIntrinsicWidth()
java.util.Map<java.awt.Shape,java.lang.String>
getLinkMap()
java.awt.Point
getLocation()
Returns the current location where the element will be rendered on the canvasboolean
hasBaseline()
boolean
isRequiresInteractivePaint()
void
paint(RenderingContext c, PdfBoxOutputDevice outputDevice, BlockBox box)
void
setLocation(int x, int y)
Assigns the new locations where the element will be rendered.
-
-
-
Field Detail
-
_image
private final FSImage _image
-
interpolate
private final boolean interpolate
-
_location
private java.awt.Point _location
-
imageMap
private final java.util.Map<java.awt.Shape,java.lang.String> imageMap
-
-
Constructor Detail
-
PdfBoxImageElement
public PdfBoxImageElement(org.w3c.dom.Element e, FSImage image, SharedContext c, boolean interpolate)
-
-
Method Detail
-
getIntrinsicWidth
public int getIntrinsicWidth()
- Specified by:
getIntrinsicWidth
in interfaceReplacedElement
-
getIntrinsicHeight
public int getIntrinsicHeight()
- Specified by:
getIntrinsicHeight
in interfaceReplacedElement
-
getLocation
public java.awt.Point getLocation()
Description copied from interface:ReplacedElement
Returns the current location where the element will be rendered on the canvas- Specified by:
getLocation
in interfaceReplacedElement
- Returns:
- see desc
-
setLocation
public void setLocation(int x, int y)
Description copied from interface:ReplacedElement
Assigns the new locations where the element will be rendered.- Specified by:
setLocation
in interfaceReplacedElement
- Parameters:
x
- new horizontal posy
- new vertical pos
-
getImage
public FSImage getImage()
-
getLinkMap
public java.util.Map<java.awt.Shape,java.lang.String> getLinkMap()
- Specified by:
getLinkMap
in interfacePdfBoxLinkManager.IPdfBoxElementWithShapedLinks
-
detach
public void detach(LayoutContext c)
- Specified by:
detach
in interfaceReplacedElement
-
isRequiresInteractivePaint
public boolean isRequiresInteractivePaint()
- Specified by:
isRequiresInteractivePaint
in interfaceReplacedElement
-
paint
public void paint(RenderingContext c, PdfBoxOutputDevice outputDevice, BlockBox box)
- Specified by:
paint
in interfacePdfBoxReplacedElement
-
getBaseline
public int getBaseline()
- Specified by:
getBaseline
in interfaceReplacedElement
-
hasBaseline
public boolean hasBaseline()
- Specified by:
hasBaseline
in interfaceReplacedElement
-
-