Package com.itextpdf.svg.renderers
Class SvgImageRenderer
java.lang.Object
com.itextpdf.layout.renderer.AbstractRenderer
com.itextpdf.layout.renderer.ImageRenderer
com.itextpdf.svg.renderers.SvgImageRenderer
- All Implemented Interfaces:
-
IPropertyContainer,ILeafElementRenderer,IRenderer
Represents a renderer for the
SvgImage layout element.
-
Field Summary
Fields inherited from class com.itextpdf.layout.renderer.ImageRenderer
deltaX, fixedXPosition, fixedYPosition, imageHeight, imageWidth, pivotYFields inherited from class com.itextpdf.layout.renderer.AbstractRenderer
childRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, OVERLAP_EPSILON, parent, positionedRenderers, properties -
Constructor Summary
ConstructorsConstructorDescriptionSvgImageRenderer(SvgImage image) Creates an SvgImageRenderer from its corresponding layout object. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(DrawContext drawContext) Flushes the renderer subtree contents, i.e.layout(LayoutContext layoutContext) This method simulates positioning of the renderer, including all of its children, and returns theLayoutResult, representing the layout result, including occupied area, status, i.e.Methods inherited from class com.itextpdf.layout.renderer.ImageRenderer
applyPaddings, autoScale, getAscent, getBorderAreaBBox, getDescent, getImageHeight, getImageWidth, getMinMaxWidth, getNextRenderer, moveMethods inherited from class com.itextpdf.layout.renderer.AbstractRenderer
addAllProperties, addChild, alignChildHorizontally, allowLastYLineRecursiveExtraction, applyAbsolutePosition, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, beginTransformationIfApplied, calculateAbsolutePdfBBox, calculateBBox, calculateShiftToPositionBBoxOfPointsAt, clipBackgroundArea, clipBackgroundArea, clipBorderArea, createXObject, deleteOwnProperty, deleteProperty, drawBackground, drawBorder, drawChildren, endElementOpacityApplying, endTransformationIfApplied, getBackgroundArea, getBorderRadii, getBorders, getChildRenderers, getDefaultProperty, getFirstYLineRecursively, getInnerAreaBBox, getLastYLineRecursively, getMargins, getMinMaxWidth, getModelElement, getOccupiedArea, getOccupiedAreaBBox, getOwnProperties, getOwnProperty, getPaddings, getParent, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, getPropertyAsTransparentColor, getPropertyAsUnitValue, hasAbsoluteUnitValue, hasOwnOrModelProperty, hasOwnProperty, hasProperty, hasRelativeUnitValue, initElementAreas, isAbsolutePosition, isBorderBoxSizing, isFirstOnRootArea, isFixedLayout, isFlushed, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isNotFittingWidth, isOverflowFit, isOverflowProperty, isOverflowProperty, isOverflowProperty, isPositioned, isRelativePosition, isStaticLayout, rectangleToPointsList, retrieveHeight, retrieveMaxHeight, retrieveMaxWidth, retrieveMinHeight, retrieveMinWidth, retrieveResolvedDeclaredHeight, retrieveUnitValue, retrieveUnitValue, retrieveWidth, setBorders, setMinMaxWidthBasedOnFixedWidth, setParent, setProperty, toString, transformPoints, updateHeight, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getDefaultProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setPropertyMethods inherited from interface com.itextpdf.layout.renderer.IRenderer
addChild, getChildRenderers, getModelElement, getOccupiedArea, getParent, getProperty, isFlushed, setParent
-
Constructor Details
-
SvgImageRenderer
Creates an SvgImageRenderer from its corresponding layout object.- Parameters:
-
image- theSvgImagewhich this object should manage
-
-
Method Details
-
layout
Description copied from interface:IRendererThis method simulates positioning of the renderer, including all of its children, and returns theLayoutResult, representing the layout result, including occupied area, status, i.e. if there was enough place to fit the renderer subtree, etc.LayoutResultcan be extended to return custom layout results for custom elements, e.g.TextRendererusesTextLayoutResultas its result. This method can be called standalone to learn how much area the renderer subtree needs, or can be called beforeIRenderer.draw(DrawContext), to prepare the renderer to be flushed to the output stream.- Specified by:
-
layoutin interfaceIRenderer - Overrides:
-
layoutin classImageRenderer - Parameters:
-
layoutContext- the description of layout area and any other additional information - Returns:
- result of the layout process
-
draw
Flushes the renderer subtree contents, i.e. draws itself on canvas, adds necessary objects to thePdfDocumentetc.- Specified by:
-
drawin interfaceIRenderer - Overrides:
-
drawin classImageRenderer - Parameters:
-
drawContext- contains thePdfDocumentto which the renderer subtree if flushed, thePdfCanvason which the renderer subtree is drawn and other additional parameters needed to perform drawing
-