public class Underline extends Object
Property.UNDERLINE
Modifier and Type | Field and Description |
---|---|
protected Color |
color |
protected int |
lineCapStyle |
protected float |
thickness |
protected float |
thicknessMul |
protected float |
yPosition |
protected float |
yPositionMul |
Constructor and Description |
---|
Underline(Color color, float thickness, float thicknessMul, float yPosition, float yPositionMul, int lineCapStyle)
Creates an Underline.
|
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
Gets the color of the underline.
|
int |
getLineCapStyle()
Gets the PdfCanvasConstants.LineCapStyle of the text underline.
|
float |
getThickness(float fontSize)
Gets the total thickness of the underline (fixed + variable part).
|
float |
getYPosition(float fontSize)
Gets the vertical position of the underline (fixed + variable part).
|
float |
getYPositionMul()
Gets the multiplier for the vertical positioning of the text underline.
|
protected Color color
protected float thickness
protected float thicknessMul
protected float yPosition
protected float yPositionMul
protected int lineCapStyle
public Underline(Color color, float thickness, float thicknessMul, float yPosition, float yPositionMul, int lineCapStyle)
thicknessMul
to 0; if you want a thickness solely dependent on the font size, set thickness
to 0. Mutatis mutandis for the y-position.
color
- the Color
of the underline
thickness
- a float defining the minimum thickness in points of the underline
thicknessMul
- a float defining the font size dependent component of the thickness of the underline
yPosition
- a float defining the default absolute vertical distance in points from the text's base line
yPositionMul
- a float defining the font size dependent component of the vertical positioning of the underline
lineCapStyle
- the way the underline finishes at its edges. PdfCanvasConstants.LineCapStyle
public float getThickness(float fontSize)
fontSize
- the font size for which to calculate the variable thickness
float
, in points
public float getYPosition(float fontSize)
fontSize
- the font size for which to calculate the variable position
float
, in points
public float getYPositionMul()
float
public int getLineCapStyle()
PdfCanvasConstants.LineCapStyle
of the text underline.
int
referring to the values of PdfCanvasConstants.LineCapStyle
Copyright © 1998–2016 iText Group NV. All rights reserved.