Table of Contents

Class ParagraphRenderer

Namespace
iText.Layout.Renderer
Assembly
itext.layout.dll

This class represents the renderer object for a Paragraph object.

public class ParagraphRenderer : BlockRenderer, IRenderer, IPropertyContainer
Inheritance
ParagraphRenderer
Implements
Derived
Inherited Members

Remarks

This class represents the renderer object for a Paragraph object. It will draw the glyphs of the textual content on the DrawContext.

Constructors

ParagraphRenderer(Paragraph)

Creates a ParagraphRenderer from its corresponding layout object.

public ParagraphRenderer(Paragraph modelElement)

Parameters

modelElement Paragraph

the Paragraph which this object should manage

Fields

lines

protected IList<LineRenderer> lines

Field Value

IList<LineRenderer>

Methods

CreateOverflowRenderer(int)

protected override AbstractRenderer CreateOverflowRenderer(int layoutResult)

Parameters

layoutResult int

Returns

AbstractRenderer

CreateOverflowRenderer(IRenderer)

protected virtual ParagraphRenderer CreateOverflowRenderer(IRenderer parent)

Parameters

parent IRenderer

Returns

ParagraphRenderer

CreateSplitRenderer(IRenderer)

protected virtual ParagraphRenderer CreateSplitRenderer(IRenderer parent)

Parameters

parent IRenderer

Returns

ParagraphRenderer

DirectLayout(LayoutContext)

protected virtual LayoutResult DirectLayout(LayoutContext layoutContext)

Parameters

layoutContext LayoutContext

Returns

LayoutResult

DrawChildren(DrawContext)

public override void DrawChildren(DrawContext drawContext)

Parameters

drawContext DrawContext

GetDefaultProperty<T1>(int)

public override T1 GetDefaultProperty<T1>(int property)

Parameters

property int

Returns

T1

Type Parameters

T1

GetFirstYLineRecursively()

protected override float? GetFirstYLineRecursively()

Returns

float?

GetLastYLineRecursively()

protected override float? GetLastYLineRecursively()

Returns

float?

GetLines()

Gets the lines which are the result of the Layout(LayoutContext).

public virtual IList<LineRenderer> GetLines()

Returns

IList<LineRenderer>

paragraph lines, or null if layout hasn't been called yet

GetMinMaxWidth()

public override MinMaxWidth GetMinMaxWidth()

Returns

MinMaxWidth

GetNextRenderer()

Gets a new instance of this class to be used as a next renderer, after this renderer is used, if Layout(LayoutContext) is called more than once.

public override IRenderer GetNextRenderer()

Returns

IRenderer

new renderer instance

Remarks

Gets a new instance of this class to be used as a next renderer, after this renderer is used, if Layout(LayoutContext) is called more than once.

If a renderer overflows to the next area, iText uses this method to create a renderer for the overflow part. So if one wants to extend ParagraphRenderer , one should override this method: otherwise the default method will be used and thus the default rather than the custom renderer will be created.

Layout(LayoutContext)

public override LayoutResult Layout(LayoutContext layoutContext)

Parameters

layoutContext LayoutContext

Returns

LayoutResult

Move(float, float)

public override void Move(float dxRight, float dyUp)

Parameters

dxRight float
dyUp float

Split()

protected virtual ParagraphRenderer[] Split()

Returns

ParagraphRenderer[]

ToString()

public override string ToString()

Returns

string