public abstract class Watermark extends Object
Learn more
More details about watermark properties: Adding text watermarks.
Modifier and Type | Method and Description |
---|---|
boolean |
getConsiderParentMargins()
Gets a value indicating whether the watermark size and coordinates are calculated
considering parent margins.
|
double |
getHeight()
Gets the desired height of this
. |
int |
getHorizontalAlignment()
Gets the horizontal alignment of this
. |
Margins |
getMargins()
Gets the margin settings of this
. |
double |
getOpacity()
Gets or sets the opacity of this
. |
double |
getRotateAngle()
Gets the rotate angle of this
in degrees. |
double |
getScaleFactor()
Gets a value that defines how watermark size depends on parent size.
|
int |
getSizingType()
Gets a value specifying a way watermark should be sized.
|
int |
getVerticalAlignment()
Gets the vertical alignment of this
. |
double |
getWidth()
Gets the desired width of this
. |
double |
getX()
Gets the x-coordinate of this
. |
double |
getY()
Gets the y-coordinate of this
. |
boolean |
isBackground()
Gets a value indicating whether the watermark should be placed at background.
|
void |
setBackground(boolean value)
Sets a value indicating whether the watermark should be placed at background.
|
void |
setConsiderParentMargins(boolean value)
Sets a value indicating whether the watermark size and coordinates are calculated
considering parent margins.
|
void |
setHeight(double value)
Sets the desired height of this
. |
void |
setHorizontalAlignment(int value)
Sets the horizontal alignment of this
. |
void |
setMargins(Margins value)
Sets the margin settings of this
. |
void |
setOpacity(double value)
Gets or sets the opacity of this
. |
void |
setRotateAngle(double value)
Sets the rotate angle of this
in degrees. |
void |
setScaleFactor(double value)
Sets a value that defines how watermark size depends on parent size.
|
void |
setSizingType(int value)
Sets a value specifying a way watermark should be sized.
|
void |
setVerticalAlignment(int value)
Sets the vertical alignment of this
. |
void |
setWidth(double value)
Sets the desired width of this
. |
void |
setX(double value)
Sets the x-coordinate of this
. |
void |
setY(double value)
Sets the y-coordinate of this
. |
public final double getOpacity()
Watermark
.
The value of opacity should be between 0 and 1. The default value is 1.
Watermark
.public final void setOpacity(double value)
Watermark
.
The value of opacity should be between 0 and 1. The default value is 1.
value
- The opacity of this Watermark
.public final double getY()
Watermark
.Watermark
.public final void setY(double value)
Watermark
.value
- The y-coordinate of this Watermark
.public final double getX()
Watermark
.Watermark
.public final void setX(double value)
Watermark
.value
- The x-coordinate of this Watermark
.public final int getVerticalAlignment()
Watermark
.
Default value is
.VerticalAlignment.None
VerticalAlignment
of this Watermark
.public final void setVerticalAlignment(int value)
Watermark
.
Default value is
.VerticalAlignment.None
value
- The VerticalAlignment
of this Watermark
.public final int getHorizontalAlignment()
Watermark
.
Default value is
.HorizontalAlignment.None
HorizontalAlignment
of this Watermark
.public final void setHorizontalAlignment(int value)
Watermark
.
Default value is
.HorizontalAlignment.None
value
- The HorizontalAlignment
of this Watermark
.public final double getRotateAngle()
Watermark
in degrees.Watermark
in degrees.public final void setRotateAngle(double value)
Watermark
in degrees.value
- The rotate angle of this Watermark
in degrees.public final boolean isBackground()
Gets a value indicating whether the watermark should be placed at background.
public final void setBackground(boolean value)
Sets a value indicating whether the watermark should be placed at background.
value
- If the value is true, the watermark will be placed at the bottom.
By default, the value is false, the watermark will be placed at the top.public final Margins getMargins()
Watermark
.Watermark
.public final void setMargins(Margins value)
Watermark
.value
- The margin settings of this Watermark
.public final double getHeight()
Watermark
.Watermark
.public final void setHeight(double value)
Watermark
.
Setting this property will also change the value of
property to Watermark.getSizingType()
.SizingType.Absolute
value
- The desired height of this Watermark
.public final double getWidth()
Watermark
.Watermark
.public final void setWidth(double value)
Watermark
.
Setting this property will also change the value of
property to Watermark.getSizingType()
.SizingType.Absolute
value
- The desired width of this Watermark
.public final double getScaleFactor()
The value must be between 0 and 1.
Watermark
.public final void setScaleFactor(double value)
The value must be between 0 and 1.
value
- The scale factor of this Watermark
.public final int getSizingType()
Gets a value specifying a way watermark should be sized.
public final void setSizingType(int value)
Sets a value specifying a way watermark should be sized.
value
- The sizing type.public final boolean getConsiderParentMargins()
Gets a value indicating whether the watermark size and coordinates are calculated considering parent margins.
public final void setConsiderParentMargins(boolean value)
Sets a value indicating whether the watermark size and coordinates are calculated considering parent margins.
value
- If the value is true, watermark size and coordinates are calculated considering parent margins.
By default, the value is false, parent margins are ignored.