Package com.openhtmltopdf.pdfboxout
Class PdfBoxReplacedElementFactory
java.lang.Object
com.openhtmltopdf.pdfboxout.PdfBoxReplacedElementFactory
- All Implemented Interfaces:
ReplacedElementFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SVGDrawer
private final FSObjectDrawerFactory
private final PdfBoxOutputDevice
private final SVGDrawer
-
Constructor Summary
ConstructorsConstructorDescriptionPdfBoxReplacedElementFactory
(PdfBoxOutputDevice outputDevice, SVGDrawer svgImpl, FSObjectDrawerFactory objectDrawerFactory, SVGDrawer mathmlImpl) -
Method Summary
Modifier and TypeMethodDescriptioncreateReplacedElement
(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight) NOTE: Only block equivalent elements can be replaced.boolean
-
Field Details
-
_svgImpl
-
_mathmlImpl
-
_objectDrawerFactory
-
_outputDevice
-
-
Constructor Details
-
PdfBoxReplacedElementFactory
public PdfBoxReplacedElementFactory(PdfBoxOutputDevice outputDevice, SVGDrawer svgImpl, FSObjectDrawerFactory objectDrawerFactory, SVGDrawer mathmlImpl)
-
-
Method Details
-
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
- Parameters:
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
- Specified by:
isReplacedElement
in interfaceReplacedElementFactory
-