Class BlockRenderer
Represents a renderer for block elements.
public abstract class BlockRenderer : AbstractRenderer, IRenderer, IPropertyContainer
- Inheritance
-
BlockRenderer
- Implements
- Derived
- Inherited Members
Constructors
BlockRenderer(IElement)
Creates a BlockRenderer from its corresponding layout object.
protected BlockRenderer(IElement modelElement)
Parameters
Methods
ApplyRotationLayout(Rectangle)
This method rotates content of the renderer and calculates correct occupied area for the rotated element.
protected virtual void ApplyRotationLayout(Rectangle layoutBox)
Parameters
ApplyVerticalAlignment()
This method applies vertical alignment for the occupied area of the renderer and its children renderers.
protected virtual void ApplyVerticalAlignment()
BeginRotationIfApplied(PdfCanvas)
This method starts rotation for the renderer if rotation angle property is specified.
protected virtual void BeginRotationIfApplied(PdfCanvas canvas)
Parameters
CreateOverflowRenderer(int)
Creates an overflow renderer.
protected virtual AbstractRenderer CreateOverflowRenderer(int layoutResult)
Parameters
layoutResult
intthe result of content layouting
Returns
- AbstractRenderer
a new AbstractRenderer instance
CreateRotationTransformInsideOccupiedArea()
This method creates AffineTransform instance that could be used to rotate content inside the occupied area.
protected virtual AffineTransform CreateRotationTransformInsideOccupiedArea()
Returns
- AffineTransform
AffineTransform that rotates the content and places it inside occupied area.
Remarks
This method creates AffineTransform instance that could be used to rotate content inside the occupied area. Be aware that it should be used only after layout rendering is finished and correct occupied area for the rotated element is calculated.
CreateSplitRenderer(int)
Creates a split renderer.
protected virtual AbstractRenderer CreateSplitRenderer(int layoutResult)
Parameters
layoutResult
intthe result of content layouting
Returns
- AbstractRenderer
a new AbstractRenderer instance
Draw(DrawContext)
public override void Draw(DrawContext drawContext)
Parameters
drawContext
DrawContext
EndRotationIfApplied(PdfCanvas)
This method ends rotation for the renderer if applied.
protected virtual void EndRotationIfApplied(PdfCanvas canvas)
Parameters
GetMinMaxWidth()
public override MinMaxWidth GetMinMaxWidth()
Returns
GetOccupiedAreaBBox()
public override Rectangle GetOccupiedAreaBBox()
Returns
GetResolvedFont(PdfDocument)
Get the font set in properties, if it is not set, then resolves the first PdfFont from FontProvider.
protected virtual PdfFont GetResolvedFont(PdfDocument pdfDocument)
Parameters
pdfDocument
PdfDocumentthe PdfDocument to get default font from.
Returns
- PdfFont
the font or null if it is not set and FontProvider is not set.
Remarks
Get the font set in properties, if it is not set, then resolves the first PdfFont from FontProvider. If FontProvider is not set, then returns null.
Layout(LayoutContext)
public override LayoutResult Layout(LayoutContext layoutContext)
Parameters
layoutContext
LayoutContext