Package com.openhtmltopdf.pdfboxout
Class PdfBoxReplacedElementFactory
- java.lang.Object
-
- com.openhtmltopdf.pdfboxout.PdfBoxReplacedElementFactory
-
- All Implemented Interfaces:
ReplacedElementFactory
public class PdfBoxReplacedElementFactory extends java.lang.Object implements ReplacedElementFactory
-
-
Field Summary
Fields Modifier and Type Field Description private SVGDrawer
_mathmlImpl
private FSObjectDrawerFactory
_objectDrawerFactory
private PdfBoxOutputDevice
_outputDevice
private SVGDrawer
_svgImpl
-
Constructor Summary
Constructors Constructor Description PdfBoxReplacedElementFactory(PdfBoxOutputDevice outputDevice, SVGDrawer svgImpl, FSObjectDrawerFactory objectDrawerFactory, SVGDrawer mathmlImpl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReplacedElement
createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight)
NOTE: Only block equivalent elements can be replaced.boolean
isReplacedElement(org.w3c.dom.Element e)
-
-
-
Field Detail
-
_svgImpl
private final SVGDrawer _svgImpl
-
_mathmlImpl
private final SVGDrawer _mathmlImpl
-
_objectDrawerFactory
private final FSObjectDrawerFactory _objectDrawerFactory
-
_outputDevice
private final PdfBoxOutputDevice _outputDevice
-
-
Constructor Detail
-
PdfBoxReplacedElementFactory
public PdfBoxReplacedElementFactory(PdfBoxOutputDevice outputDevice, SVGDrawer svgImpl, FSObjectDrawerFactory objectDrawerFactory, SVGDrawer mathmlImpl)
-
-
Method Detail
-
createReplacedElement
public ReplacedElement createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight)
Description copied from interface:ReplacedElementFactory
NOTE: Only block equivalent elements can be replaced.- Specified by:
createReplacedElement
in interfaceReplacedElementFactory
cssWidth
- The CSS width of the element in dots (or-1
if width isauto
)cssHeight
- The CSS height of the element in dots (or-1
if the height should be treated asauto
)- Returns:
- The
ReplacedElement
ornull
if noReplacedElement
applies
-
isReplacedElement
public boolean isReplacedElement(org.w3c.dom.Element e)
- Specified by:
isReplacedElement
in interfaceReplacedElementFactory
-
-