Package com.itextpdf.svg.element
Class SvgImage
- All Implemented Interfaces:
-
IAbstractElement
,IElement
,ILeafElement
,IPropertyContainer
,IAccessibleElement
A layout element that represents SVG image for inclusion in the document model.
-
Field Summary
Fields inherited from class com.itextpdf.layout.element.Image
tagProperties, xObject
Fields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, styles
Fields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties
-
Constructor Summary
ConstructorDescriptionSvgImage
(SvgImageXObject xObject) Creates anSvgImage
from theSvgImageXObject
which represents Form XObject and contains processor result with the SVG information and resource resolver for the SVG image. -
Method Summary
Modifier and TypeMethodDescriptionvoid
generate
(PdfDocument document) Draws SVG image to a canvas-like object maintained in theSvgDrawContext
.protected IRenderer
Creates new renderer instance.Methods inherited from class com.itextpdf.layout.element.Image
getAccessibilityProperties, getImageHeight, getImageScaledHeight, getImageScaledWidth, getImageWidth, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getObjectFit, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getWidth, getXObject, scale, scaleAbsolute, scaleToFit, setAutoScale, setAutoScaleHeight, setAutoScaleWidth, setFixedPosition, setFixedPosition, setHeight, setHeight, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setNeutralRole, setObjectFit, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setWidth, setWidth
Methods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
Methods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getDefaultProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalic
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.itextpdf.layout.element.IElement
createRendererSubTree, getRenderer, setNextRenderer
Methods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getDefaultProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Constructor Details
-
SvgImage
Creates anSvgImage
from theSvgImageXObject
which represents Form XObject and contains processor result with the SVG information and resource resolver for the SVG image.- Parameters:
-
xObject
- an internalSvgImageXObject
.
-
-
Method Details
-
generate
Draws SVG image to a canvas-like object maintained in theSvgDrawContext
.- Parameters:
-
document
- pdf that shall contain the SVG image.
-
makeNewRenderer
Creates new renderer instance.- Overrides:
-
makeNewRenderer
in classImage
- Returns:
-
new
IRenderer
-