Class CellRenderer
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
Methods
ApplyBorderBox(Rectangle, Border[], bool)
protected override Rectangle ApplyBorderBox(Rectangle rect, Border[] borders, bool reverse)
Parameters
Returns
ApplyMargins(Rectangle, UnitValue[], bool)
protected override Rectangle ApplyMargins(Rectangle rect, UnitValue[] margins, bool reverse)
Parameters
Returns
ApplySpacings(Rectangle, bool)
Applies spacings on the given rectangle.
protected virtual Rectangle ApplySpacings(Rectangle rect, bool reverse)
Parameters
rect
Rectanglea rectangle spacings will be applied on
reverse
boolindicates 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
Rectanglea rectangle spacings will be applied on
spacings
float[]the spacings to be applied on the given rectangle
reverse
boolindicates 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
CreateSplitRenderer(int)
protected override AbstractRenderer CreateSplitRenderer(int layoutResult)
Parameters
layoutResult
int
Returns
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
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