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 int |
baseCharactersCount()
Returns the number of base characters, i.e.
|
protected boolean |
containsImage() |
protected LineRenderer |
createOverflowRenderer() |
protected LineRenderer |
createSplitRenderer() |
protected Float |
getFirstYLineRecursively()
Gets the first yLine of the nested children recursively.
|
float |
getLeadingValue(Leading leading) |
float |
getMaxAscent() |
float |
getMaxDescent() |
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() |
protected void |
justify(float width) |
LineLayoutResult |
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, applyAbsolutePositioningTranslation, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyMargins, applyMargins, applyPaddings, applyPaddings, calculateAbsolutePdfBBox, calculateBBox, deleteOwnProperty, deleteProperty, draw, drawBackground, drawBorder, drawChildren, getBorderAreaBBox, getBorders, getChildRenderers, getDefaultProperty, getInnerAreaBBox, getMargins, getModelElement, getOccupiedArea, getOccupiedAreaBBox, getOwnProperties, getOwnProperty, getPaddings, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, hasOwnOrModelProperty, hasOwnProperty, hasProperty, initElementAreas, isFixedLayout, isFlushed, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isPositioned, isRelativePosition, move, rectangleToPointsList, retrieveHeight, retrieveUnitValue, retrieveWidth, setBorders, setParent, setProperty, transformPoints
protected float maxAscent
protected float maxDescent
protected byte[] levels
public LineLayoutResult 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 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 LineRenderer trimLast()
protected boolean containsImage()
Copyright © 1998–2016 iText Group NV. All rights reserved.