Table of Contents

Class CellRenderer

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

Represents a renderer for the Cell layout element.

public class CellRenderer : BlockRenderer, IRenderer, IPropertyContainer
Inheritance
CellRenderer
Implements
Inherited Members

Constructors

CellRenderer(Cell)

Creates a CellRenderer from its corresponding layout object.

public CellRenderer(Cell modelElement)

Parameters

modelElement Cell

the Cell which this object should manage

Methods

ApplyBorderBox(Rectangle, Border[], bool)

protected override Rectangle ApplyBorderBox(Rectangle rect, Border[] borders, bool reverse)

Parameters

rect Rectangle
borders Border[]
reverse bool

Returns

Rectangle

ApplyMargins(Rectangle, UnitValue[], bool)

protected override Rectangle ApplyMargins(Rectangle rect, UnitValue[] margins, bool reverse)

Parameters

rect Rectangle
margins UnitValue[]
reverse bool

Returns

Rectangle

ApplySpacings(Rectangle, bool)

Applies spacings on the given rectangle.

protected virtual Rectangle ApplySpacings(Rectangle rect, bool reverse)

Parameters

rect Rectangle

a rectangle spacings will be applied on

reverse bool

indicates whether spacings will be applied inside (in case of false) or outside (in case of true) the rectangle.

Returns

Rectangle

a border box of the renderer

ApplySpacings(Rectangle, float[], bool)

Applies given spacings on the given rectangle.

protected virtual Rectangle ApplySpacings(Rectangle rect, float[] spacings, bool reverse)

Parameters

rect Rectangle

a rectangle spacings will be applied on

spacings float[]

the spacings to be applied on the given rectangle

reverse bool

indicates whether spacings will be applied inside (in case of false) or outside (in case of true) the rectangle.

Returns

Rectangle

a border box of the renderer

CreateOverflowRenderer(int)

protected override AbstractRenderer CreateOverflowRenderer(int layoutResult)

Parameters

layoutResult int

Returns

AbstractRenderer

CreateSplitRenderer(int)

protected override AbstractRenderer CreateSplitRenderer(int layoutResult)

Parameters

layoutResult int

Returns

AbstractRenderer

DrawBackground(DrawContext)

public override void DrawBackground(DrawContext drawContext)

Parameters

drawContext DrawContext

DrawBorder(DrawContext)

public override void DrawBorder(DrawContext drawContext)

Parameters

drawContext DrawContext

GetModelElement()

public override IPropertyContainer GetModelElement()

Returns

IPropertyContainer

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 CellRenderer , one should override this method: otherwise the default method will be used and thus the default rather than the custom renderer will be created.

RetrieveWidth(float)

protected override float? RetrieveWidth(float parentBoxWidth)

Parameters

parentBoxWidth float

Returns

float?