public abstract class BlockRenderer extends AbstractRenderer
childRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, parent, positionedRenderers, properties| Modifier | Constructor and Description |
|---|---|
protected |
BlockRenderer(IElement modelElement) |
| Modifier and Type | Method and Description |
|---|---|
protected float |
applyBordersPaddingsMargins(Rectangle parentBBox, Border[] borders, float[] paddings) |
protected float[] |
applyRotation()
Deprecated.
Will be removed in iText 7.1
|
protected void |
applyRotationLayout(Rectangle layoutBox) |
protected void |
applyVerticalAlignment() |
protected void |
beginRotationIfApplied(PdfCanvas canvas) |
protected void |
correctPositionedLayout(Rectangle layoutBox) |
protected AbstractRenderer |
createOverflowRenderer(int layoutResult) |
protected AffineTransform |
createRotationTransformInsideOccupiedArea()
This method creates AffineTransform instance that could be used to rotate content inside the occupied area.
|
protected AbstractRenderer |
createSplitRenderer(int layoutResult) |
void |
draw(DrawContext drawContext)
Flushes the renderer subtree contents, i.e.
|
protected void |
endRotationIfApplied(PdfCanvas canvas) |
protected MinMaxWidth |
getMinMaxWidth(float availableWidth) |
Rectangle |
getOccupiedAreaBBox()
Gets the bounding box that contains all content written to the DrawContext by this IRenderer.
|
LayoutResult |
layout(LayoutContext layoutContext)
This method simulates positioning of the renderer, including all of its children, and returns the LayoutResult, representing the layout result, including occupied area, status, i.e.
|
addAllProperties, addChild, alignChildHorizontally, alignChildHorizontally, applyAbsolutePosition, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyPaddings, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, calculateAbsolutePdfBBox, calculateBBox, calculateShiftToPositionBBoxOfPointsAt, deleteOwnProperty, deleteProperty, drawBackground, drawBorder, drawChildren, endElementOpacityApplying, getBorderAreaBBox, getBorders, getChildRenderers, getDefaultProperty, getFirstYLineRecursively, getInnerAreaBBox, getMargins, getModelElement, getOccupiedArea, getOwnProperties, getOwnProperty, getPaddings, getParent, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, getPropertyAsTransparentColor, hasOwnOrModelProperty, hasOwnProperty, hasProperty, initElementAreas, isAbsolutePosition, isFixedLayout, isFlushed, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isPositioned, isRelativePosition, isStaticLayout, move, overrideHeightProperties, rectangleToPointsList, retrieveHeight, retrieveMaxHeight, retrieveMinHeight, retrieveUnitValue, retrieveWidth, setBorders, setParent, setProperty, toString, transformPointsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNextRendererprotected BlockRenderer(IElement modelElement)
public LayoutResult layout(LayoutContext layoutContext)
IRenderer
LayoutResult, representing the layout result, including occupied area, status, i.e. if there was enough place to fit the renderer subtree, etc. LayoutResult can be extended to return custom layout results for custom elements, e.g. TextRenderer uses TextLayoutResult as its result. This method can be called standalone to learn how much area the renderer subtree needs, or can be called before IRenderer.draw(DrawContext), to prepare the renderer to be flushed to the output stream.
layoutContext - the description of layout area and any other additional information
protected AbstractRenderer createSplitRenderer(int layoutResult)
protected AbstractRenderer createOverflowRenderer(int layoutResult)
public void draw(DrawContext drawContext)
AbstractRenderer
PdfDocument etc.
draw in interface IRenderer
draw in class AbstractRenderer
drawContext - contains the PdfDocument to which the renderer subtree if flushed, the PdfCanvas on which the renderer subtree is drawn and other additional parameters needed to perform drawing
public Rectangle getOccupiedAreaBBox()
AbstractRenderer
DrawContext by this IRenderer.
getOccupiedAreaBBox in class AbstractRenderer
Rectangle that surrounds the content
protected void applyVerticalAlignment()
protected void applyRotationLayout(Rectangle layoutBox)
@Deprecated protected float[] applyRotation()
protected AffineTransform createRotationTransformInsideOccupiedArea()
AffineTransform instance that could be used to rotate content inside the occupied area. Be aware that it should be used only after layout rendering is finished and correct occupied area for the rotated element is calculated.
AffineTransform that rotates the content and places it inside occupied area.
protected void beginRotationIfApplied(PdfCanvas canvas)
protected void endRotationIfApplied(PdfCanvas canvas)
protected void correctPositionedLayout(Rectangle layoutBox)
protected float applyBordersPaddingsMargins(Rectangle parentBBox, Border[] borders, float[] paddings)
protected MinMaxWidth getMinMaxWidth(float availableWidth)
Copyright © 1998–2017 iText Group NV. All rights reserved.