public class CustomLineSeparator extends Object implements com.itextpdf.kernel.pdf.canvas.draw.ILineDrawer
| 限定符和类型 | 字段和说明 |
|---|---|
protected com.itextpdf.layout.property.HorizontalAlignment |
alignment
The alignment of the line.
|
protected com.itextpdf.kernel.colors.Color |
color
The color of the line.
|
protected float |
lineWidth
The thickness of the line.
|
protected float |
percentage
The width of the line as a percentage of the available page width.
|
| 构造器和说明 |
|---|
CustomLineSeparator() |
CustomLineSeparator(float lineWidth) |
CustomLineSeparator(float lineWidth,
float percentage) |
CustomLineSeparator(float lineWidth,
float percentage,
com.itextpdf.kernel.colors.Color color) |
CustomLineSeparator(float lineWidth,
float percentage,
com.itextpdf.kernel.colors.Color color,
com.itextpdf.layout.property.HorizontalAlignment alignment) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
draw(com.itextpdf.kernel.pdf.canvas.PdfCanvas canvas,
com.itextpdf.kernel.geom.Rectangle drawArea) |
void |
drawLine(com.itextpdf.kernel.pdf.canvas.PdfCanvas canvas,
float leftX,
float rightX,
float y)
Draws a horizontal line.
|
com.itextpdf.layout.property.HorizontalAlignment |
getAlignment() |
com.itextpdf.kernel.colors.Color |
getColor() |
float |
getLineWidth() |
float |
getPercentage() |
void |
setAlignment(com.itextpdf.layout.property.HorizontalAlignment alignment) |
void |
setColor(com.itextpdf.kernel.colors.Color color) |
void |
setLineWidth(float lineWidth) |
void |
setPercentage(float percentage) |
protected float lineWidth
protected float percentage
protected com.itextpdf.kernel.colors.Color color
protected com.itextpdf.layout.property.HorizontalAlignment alignment
public CustomLineSeparator()
public CustomLineSeparator(float lineWidth)
public CustomLineSeparator(float lineWidth,
float percentage)
public CustomLineSeparator(float lineWidth,
float percentage,
com.itextpdf.kernel.colors.Color color)
public CustomLineSeparator(float lineWidth,
float percentage,
com.itextpdf.kernel.colors.Color color,
com.itextpdf.layout.property.HorizontalAlignment alignment)
public void draw(com.itextpdf.kernel.pdf.canvas.PdfCanvas canvas,
com.itextpdf.kernel.geom.Rectangle drawArea)
draw 在接口中 com.itextpdf.kernel.pdf.canvas.draw.ILineDrawerpublic void drawLine(com.itextpdf.kernel.pdf.canvas.PdfCanvas canvas,
float leftX,
float rightX,
float y)
canvas - the canvas to draw onleftX - the left x coordinaterightX - the right x coordindatey - the y coordinatepublic float getLineWidth()
getLineWidth 在接口中 com.itextpdf.kernel.pdf.canvas.draw.ILineDrawerpublic void setLineWidth(float lineWidth)
setLineWidth 在接口中 com.itextpdf.kernel.pdf.canvas.draw.ILineDrawerpublic com.itextpdf.kernel.colors.Color getColor()
getColor 在接口中 com.itextpdf.kernel.pdf.canvas.draw.ILineDrawerpublic void setColor(com.itextpdf.kernel.colors.Color color)
setColor 在接口中 com.itextpdf.kernel.pdf.canvas.draw.ILineDrawerpublic float getPercentage()
public void setPercentage(float percentage)
public com.itextpdf.layout.property.HorizontalAlignment getAlignment()
public void setAlignment(com.itextpdf.layout.property.HorizontalAlignment alignment)
Copyright © 2021. All rights reserved.