Class DashedLine
java.lang.Object
com.itextpdf.kernel.pdf.canvas.draw.DashedLine
- All Implemented Interfaces:
ILineDrawer
Implementation of
ILineDrawer which draws a dashed horizontal line over
the middle of the specified rectangle.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDashedLine(float lineWidth) Creates an instance ofDashedLinewith the specified line width. -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms configurable drawing operations related to specific region coordinates on a canvas.getColor()Gets the color of the linefloatGets line width in points.voidSets line colorvoidsetLineWidth(float lineWidth) Sets line width in points.
-
Field Details
-
lineWidth
private float lineWidth -
color
-
-
Constructor Details
-
DashedLine
public DashedLine() -
DashedLine
public DashedLine(float lineWidth) Creates an instance ofDashedLinewith the specified line width.- Parameters:
lineWidth- the line width
-
-
Method Details
-
draw
Description copied from interface:ILineDrawerPerforms configurable drawing operations related to specific region coordinates on a canvas.- Specified by:
drawin interfaceILineDrawer- Parameters:
canvas- the canvas to draw ondrawArea- the rectangle in relation to which to fulfill drawing instructions
-
getLineWidth
public float getLineWidth()Gets line width in points.- Specified by:
getLineWidthin interfaceILineDrawer- Returns:
- line thickness
-
setLineWidth
public void setLineWidth(float lineWidth) Sets line width in points.- Specified by:
setLineWidthin interfaceILineDrawer- Parameters:
lineWidth- new line width
-
getColor
Description copied from interface:ILineDrawerGets the color of the line- Specified by:
getColorin interfaceILineDrawer- Returns:
- color of the line
-
setColor
Description copied from interface:ILineDrawerSets line color- Specified by:
setColorin interfaceILineDrawer- Parameters:
color- new line color
-