Package com.itextpdf.layout.renderer
Class CanvasRenderer
- java.lang.Object
-
- com.itextpdf.layout.renderer.AbstractRenderer
-
- com.itextpdf.layout.renderer.RootRenderer
-
- com.itextpdf.layout.renderer.CanvasRenderer
-
- All Implemented Interfaces:
IPropertyContainer
,IRenderer
public class CanvasRenderer extends RootRenderer
Represents a renderer for theCanvas
layout element.
-
-
Field Summary
Fields Modifier and Type Field Description protected Canvas
canvas
-
Fields inherited from class com.itextpdf.layout.renderer.RootRenderer
currentArea, floatRendererAreas, immediateFlush, waitingDrawingElements
-
Fields inherited from class com.itextpdf.layout.renderer.AbstractRenderer
BOTTOM_SIDE, childRenderers, EPS, flushed, INF, isLastRendererForModelElement, LEFT_SIDE, modelElement, occupiedArea, OVERLAP_EPSILON, parent, positionedRenderers, properties, RIGHT_SIDE, TOP_SIDE
-
-
Constructor Summary
Constructors Constructor Description CanvasRenderer(Canvas canvas)
Creates a CanvasRenderer from its corresponding layout object.CanvasRenderer(Canvas canvas, boolean immediateFlush)
Creates a CanvasRenderer from its corresponding layout object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(IRenderer renderer)
Adds a child to the current rendererprotected void
flushSingleRenderer(IRenderer resultRenderer)
IRenderer
getNextRenderer()
ForCanvasRenderer
, this has a meaning of the renderer that will be used for relayout.protected LayoutArea
updateCurrentArea(LayoutResult overflowResult)
-
Methods inherited from class com.itextpdf.layout.renderer.RootRenderer
close, flush, flushWaitingDrawingElements, flushWaitingDrawingElements, getCurrentArea, layout, linkRenderToDocument, shrinkCurrentAreaAndProcessRenderer
-
Methods inherited from class com.itextpdf.layout.renderer.AbstractRenderer
addAllChildRenderers, addAllChildRenderers, addAllProperties, addChildRenderer, alignChildHorizontally, allowLastYLineRecursiveExtraction, applyAbsolutePosition, applyAbsolutePositionIfNeeded, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyMarginsBordersPaddings, applyPaddings, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, beginTransformationIfApplied, calculateAbsolutePdfBBox, calculateAdditionalWidth, calculateBBox, calculatePaddingBorderHeight, calculatePaddingBorderWidth, calculateShiftToPositionBBoxOfPointsAt, clipBackgroundArea, clipBackgroundArea, clipBorderArea, createFontCharacteristics, createXObject, deleteOwnProperty, deleteProperty, draw, drawBackground, drawBorder, drawChildren, drawPositionedChildren, endElementOpacityApplying, endTransformationIfApplied, getAspectRatio, getBackgroundArea, getBorderAreaBBox, getBorderRadii, getBorders, getBorders, getChildRenderers, getDefaultProperty, getFirstYLineRecursively, getInnerAreaBBox, getLastYLineRecursively, getMargins, getMinMaxWidth, getModelElement, getOccupiedArea, getOccupiedAreaBBox, getOwnProperties, getOwnProperty, getPaddings, getParent, getPdfDocument, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, getPropertyAsTransparentColor, getPropertyAsUnitValue, getPropertyAsUnitValue, getRootRenderer, hasAbsoluteUnitValue, hasAspectRatio, hasOwnOrModelProperty, hasOwnProperty, hasProperty, hasRelativeUnitValue, initElementAreas, isAbsolutePosition, isBorderBoxSizing, isFirstOnRootArea, isFirstOnRootArea, isFixedLayout, isFlushed, isKeepTogether, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isNotFittingWidth, isOverflowFit, isOverflowProperty, isOverflowProperty, isOverflowProperty, isPositioned, isRelativePosition, isStaticLayout, logWarningIfGetNextRendererNotOverridden, move, noAbsolutePositionInfo, preparePositionedRendererAndAreaForLayout, processWaitingDrawing, rectangleToPointsList, removeAllChildRenderers, removeChildRenderer, replaceOwnProperty, resolveFirstPdfFont, resolveFirstPdfFont, retrieveHeight, retrieveMaxHeight, retrieveMaxWidth, retrieveMinHeight, retrieveMinWidth, retrieveUnitValue, retrieveUnitValue, retrieveWidth, returnBackOwnProperty, setBorders, setChildRenderer, setChildRenderers, setMinMaxWidthBasedOnFixedWidth, setParent, setProperty, setThisAsParent, shrinkOccupiedAreaForAbsolutePosition, toString, transformPoints, updateHeight, updateHeightsOnSplit, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidth
-
-
-
-
Field Detail
-
canvas
protected Canvas canvas
-
-
Constructor Detail
-
CanvasRenderer
public CanvasRenderer(Canvas canvas)
Creates a CanvasRenderer from its corresponding layout object. SetsRootRenderer.immediateFlush
to true.- Parameters:
canvas
- theCanvas
which this object should manage
-
CanvasRenderer
public CanvasRenderer(Canvas canvas, boolean immediateFlush)
Creates a CanvasRenderer from its corresponding layout object. Defines whether the content should be flushed immediately after additionaddChild(IRenderer)
or not- Parameters:
canvas
- theCanvas
which this object should manageimmediateFlush
- the value which stands for immediate flushing
-
-
Method Detail
-
addChild
public void addChild(IRenderer renderer)
Description copied from class:AbstractRenderer
Adds a child to the current renderer- Specified by:
addChild
in interfaceIRenderer
- Overrides:
addChild
in classRootRenderer
- Parameters:
renderer
- a child to be added
-
flushSingleRenderer
protected void flushSingleRenderer(IRenderer resultRenderer)
- Specified by:
flushSingleRenderer
in classRootRenderer
-
updateCurrentArea
protected LayoutArea updateCurrentArea(LayoutResult overflowResult)
- Specified by:
updateCurrentArea
in classRootRenderer
-
getNextRenderer
public IRenderer getNextRenderer()
ForCanvasRenderer
, this has a meaning of the renderer that will be used for relayout.- Returns:
- relayout renderer.
-
-