public class Watermark extends Object
Represents text watermark.
| Constructor and Description |
|---|
Watermark(String text)
Initializes new instance of
Watermark class. |
| Modifier and Type | Method and Description |
|---|---|
Color |
getColor()
The watermark color.
|
String |
getFontName()
The font name used for the watermark.
|
Position |
getPosition()
The watermark position.
|
Size |
getSize()
The watermark size.
|
String |
getText()
The watermark text.
|
void |
setColor(Color value)
The watermark color.
|
void |
setFontName(String value)
The font name used for the watermark.
|
void |
setPosition(Position value)
The watermark position.
|
void |
setSize(Size value)
The watermark size.
|
public Watermark(String text)
Initializes new instance of Watermark class.
text - Watermark text.IllegalArgumentException - Thrown when text is null or empty.public final Color getColor()
The watermark color.
Default value is Color.getRed().
public final String getFontName()
The font name used for the watermark.
public final Position getPosition()
The watermark position.
Default value is Position.DIAGONAL.
public final Size getSize()
The watermark size.
Default value is Size.FULL_SIZE.
public final String getText()
public final void setColor(Color value)
The watermark color.
Default value is Color.getRed().
public final void setFontName(String value)
The font name used for the watermark.
public final void setPosition(Position value)
The watermark position.
Default value is Position.DIAGONAL.
value - The watermark position.public final void setSize(Size value)
The watermark size.
Default value is Size.FULL_SIZE.