public class LineRenderer extends AbstractRenderer
Modifier and Type | Field and Description |
---|---|
protected byte[] |
levels |
protected float |
maxAscent |
protected float |
maxDescent |
childRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, parent, positionedRenderers, properties
Constructor and Description |
---|
LineRenderer() |
Modifier and Type | Method and Description |
---|---|
protected LineRenderer |
adjustChildrenYLine() |
protected void |
applyLeading(float deltaY) |
protected int |
baseCharactersCount()
Returns the number of base characters, i.e.
|
boolean |
containsImage() |
protected LineRenderer |
createOverflowRenderer() |
protected LineRenderer |
createSplitRenderer() |
protected Float |
getFirstYLineRecursively()
Gets the first yLine of the nested children recursively.
|
protected Float |
getLastYLineRecursively() |
float |
getLeadingValue(Leading leading) |
float |
getMaxAscent() |
float |
getMaxDescent() |
protected MinMaxWidth |
getMinMaxWidth() |
IRenderer |
getNextRenderer()
Gets a new instance of this class to be used as a next renderer, after this renderer is used, if IRenderer.layout(LayoutContext) is called more than once.
|
protected int |
getNumberOfSpaces() |
float |
getYLine() |
void |
justify(float width) |
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.
|
protected int |
length()
Gets the total lengths of characters in this line.
|
protected LineRenderer[] |
split() |
String |
toString()
Returns a string representation of the renderer.
|
protected LineRenderer |
trimLast() |
addAllProperties, addChild, alignChildHorizontally, allowLastYLineRecursiveExtraction, applyAbsolutePosition, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyPaddings, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, beginTransformationIfApplied, calculateAbsolutePdfBBox, calculateBBox, calculateShiftToPositionBBoxOfPointsAt, clipBackgroundArea, clipBorderArea, deleteOwnProperty, deleteProperty, draw, drawBackground, drawBorder, drawChildren, endElementOpacityApplying, endTransformationIfApplied, getBorderAreaBBox, getBorderRadii, getBorders, getChildRenderers, getDefaultProperty, getInnerAreaBBox, getMargins, 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, move, rectangleToPointsList, retrieveHeight, retrieveMaxHeight, retrieveMaxWidth, retrieveMinHeight, retrieveMinWidth, retrieveUnitValue, retrieveUnitValue, retrieveWidth, setBorders, setMinMaxWidthBasedOnFixedWidth, setParent, setProperty, transformPoints, updateHeight, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidth
protected float maxAscent
protected float maxDescent
protected byte[] levels
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
public float getMaxAscent()
public float getMaxDescent()
public float getYLine()
public float getLeadingValue(Leading leading)
public IRenderer getNextRenderer()
IRenderer
IRenderer.layout(LayoutContext)
is called more than once.
protected Float getFirstYLineRecursively()
AbstractRenderer
getFirstYLineRecursively
in class AbstractRenderer
protected Float getLastYLineRecursively()
getLastYLineRecursively
in class AbstractRenderer
public void justify(float width)
protected int getNumberOfSpaces()
protected int length()
protected int baseCharactersCount()
public String toString()
AbstractRenderer
toString
in class AbstractRenderer
String
Object.toString()
protected LineRenderer createSplitRenderer()
protected LineRenderer createOverflowRenderer()
protected LineRenderer[] split()
protected LineRenderer adjustChildrenYLine()
protected void applyLeading(float deltaY)
protected LineRenderer trimLast()
public boolean containsImage()
protected MinMaxWidth getMinMaxWidth()
getMinMaxWidth
in class AbstractRenderer
Copyright © 1998–2018 iText Group NV. All rights reserved.