Class ParagraphRenderer
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
Fields
lines
protected IList<LineRenderer> lines
Field Value
Methods
CreateOverflowRenderer(int)
protected override AbstractRenderer CreateOverflowRenderer(int layoutResult)
Parameters
layoutResult
int
Returns
CreateOverflowRenderer(IRenderer)
protected virtual ParagraphRenderer CreateOverflowRenderer(IRenderer parent)
Parameters
parent
IRenderer
Returns
CreateSplitRenderer(IRenderer)
protected virtual ParagraphRenderer CreateSplitRenderer(IRenderer parent)
Parameters
parent
IRenderer
Returns
DirectLayout(LayoutContext)
protected virtual LayoutResult DirectLayout(LayoutContext layoutContext)
Parameters
layoutContext
LayoutContext
Returns
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
GetLastYLineRecursively()
protected override float? GetLastYLineRecursively()
Returns
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
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
Move(float, float)
public override void Move(float dxRight, float dyUp)
Parameters
Split()
protected virtual ParagraphRenderer[] Split()
Returns
ToString()
public override string ToString()