public class LineRenderer extends AbstractRenderer
| Modifier and Type | Class and Description |
|---|---|
static class |
LineRenderer.RendererGlyph |
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
levels |
protected float |
maxAscent |
protected float |
maxDescent |
childRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, OVERLAP_EPSILON, 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() |
void |
drawChildren(DrawContext drawContext)
Performs the drawing operation for all
children
of this renderer. |
protected Float |
getFirstYLineRecursively()
Gets the first yLine of the nested children recursively.
|
protected Float |
getLastYLineRecursively() |
float |
getLeadingValue(Leading leading) |
float |
getMaxAscent() |
float |
getMaxDescent() |
MinMaxWidth |
getMinMaxWidth()
Calculates min and max width values for current renderer.
|
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 Float |
retrieveResolvedDeclaredHeight()
Retrieve the resolved height declaration.
|
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, clipBackgroundArea, clipBorderArea, createXObject, deleteOwnProperty, deleteProperty, draw, drawBackground, drawBorder, endElementOpacityApplying, endTransformationIfApplied, getBackgroundArea, getBorderAreaBBox, getBorderRadii, getBorders, getChildRenderers, getDefaultProperty, getInnerAreaBBox, 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, move, rectangleToPointsList, retrieveHeight, retrieveMaxHeight, retrieveMaxWidth, retrieveMinHeight, retrieveMinWidth, retrieveUnitValue, retrieveUnitValue, retrieveWidth, setBorders, setMinMaxWidthBasedOnFixedWidth, setParent, setProperty, transformPoints, updateHeight, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidthprotected float maxAscent
protected float maxDescent
protected byte[] levels
public LayoutResult layout(LayoutContext layoutContext)
IRendererLayoutResult, 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 informationpublic float getMaxAscent()
public float getMaxDescent()
public float getYLine()
public float getLeadingValue(Leading leading)
public void drawChildren(DrawContext drawContext)
AbstractRendererchildren
of this renderer.drawChildren in class AbstractRendererdrawContext - the context (canvas, document, etc.) of this drawing operation.public IRenderer getNextRenderer()
IRendererIRenderer.layout(LayoutContext) is called more than once.protected Float getFirstYLineRecursively()
AbstractRenderergetFirstYLineRecursively in class AbstractRendererprotected Float getLastYLineRecursively()
getLastYLineRecursively in class AbstractRendererpublic void justify(float width)
protected int getNumberOfSpaces()
protected int length()
protected int baseCharactersCount()
public String toString()
AbstractRenderertoString in class AbstractRendererStringObject.toString()protected LineRenderer createSplitRenderer()
protected LineRenderer createOverflowRenderer()
protected LineRenderer[] split()
protected LineRenderer adjustChildrenYLine()
protected void applyLeading(float deltaY)
protected LineRenderer trimLast()
public boolean containsImage()
public MinMaxWidth getMinMaxWidth()
AbstractRenderergetMinMaxWidth in class AbstractRendererMinMaxWidthprotected Float retrieveResolvedDeclaredHeight()
AbstractRenderer.retrieveHeight() is called.retrieveResolvedDeclaredHeight in class AbstractRenderernull if no height declaration is set on the parent, or if its own height declaration
cannot be resolved. The float value of the resolved height otherwiseCopyright © 1998–2025 Apryse Group NV. All rights reserved.