Class LineSeparator
- Namespace
- iTextSharp.text.pdf.draw
- Assembly
- iTextSharp.LGPLv2.Core.dll
Element that draws a solid line from left to right. Can be added directly to a document or column. Can also be used to create a separator chunk. @author Paulo Soares @since 2.1.2
public class LineSeparator : VerticalPositionMark, IDrawInterface, IElement
- Inheritance
-
LineSeparator
- Implements
- Derived
- Inherited Members
Constructors
LineSeparator()
Creates a new instance of the LineSeparator class with default values: lineWidth 1 user unit, width 100%, centered with offset 0.
public LineSeparator()
LineSeparator(float, float, BaseColor, int, float)
Creates a new instance of the LineSeparator class.
public LineSeparator(float lineWidth, float percentage, BaseColor lineColor, int align, float offset)
Parameters
lineWidth
floatthe thickness of the line
percentage
floatthe width of the line as a percentage of the available page width
lineColor
BaseColorthe color of the line
align
intthe alignment
offset
floatthe offset of the line relative to the current baseline (negative = under the baseline)
Properties
Alignment
Setter for the alignment of the line.
public int Alignment { get; set; }
Property Value
LineColor
public BaseColor LineColor { get; set; }
Property Value
LineWidth
Setter for the line width.
public float LineWidth { get; set; }
Property Value
Percentage
Setter for the width as a percentage of the available width.
public float Percentage { get; set; }
Property Value
- float
a width percentage
Methods
Draw(PdfContentByte, float, float, float, float, float)
@see com.lowagie.text.pdf.draw.DrawInterface#draw(com.lowagie.text.pdf.PdfContentByte, float, float, float, float, float)
public override void Draw(PdfContentByte canvas, float llx, float lly, float urx, float ury, float y)
Parameters
DrawLine(PdfContentByte, float, float, float)
Draws a horizontal line.
public void DrawLine(PdfContentByte canvas, float leftX, float rightX, float y)
Parameters
canvas
PdfContentBytethe canvas to draw on
leftX
floatthe left x coordinate
rightX
floatthe right x coordindate
y
floatthe y coordinate