Package com.day.cq.dam.commons.watermark
Class Watermark
- java.lang.Object
-
- com.day.cq.dam.commons.watermark.Watermark
-
- Direct Known Subclasses:
ImageWatermark
public abstract class Watermark extends java.lang.Object
AWatermark
object represents the properties of a watermark effect, namely,
- position - relative to the underlying source image
- top, left - y, x coordinates from top-left corner of underlying image
- orientation - angle of rotation as measured from the x-axis in clockwise direction
- opacity - transparency of the watermark
The position can be specified as aLocation
or using top, left values.
If specified as aLocation
, it is transformed to x,y using image height,width values at the time of application of the watermark.
-
-
Field Summary
Fields Modifier and Type Field Description static Location
DEFAULT_LOCATION
static float
DEFAULT_OPACITY
static double
DEFAULT_ORIENTATION
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLeft()
float
getOpacity()
double
getOrientation()
Location
getPosition()
int
getTop()
void
setCoords(int imgWidth, int imgHeight, int wmWidth, int wmHeight)
void
setLeft(int left)
void
setOpacity(float opacity)
void
setOrientation(int orientation)
void
setPosition(Location position)
void
setTop(int top)
java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_LOCATION
public static final Location DEFAULT_LOCATION
-
DEFAULT_ORIENTATION
public static final double DEFAULT_ORIENTATION
- See Also:
- Constant Field Values
-
DEFAULT_OPACITY
public static final float DEFAULT_OPACITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPosition
public Location getPosition()
-
setPosition
public void setPosition(Location position)
-
getTop
public int getTop()
-
setTop
public void setTop(int top)
-
getLeft
public int getLeft()
-
setLeft
public void setLeft(int left)
-
getOrientation
public double getOrientation()
-
setOrientation
public void setOrientation(int orientation)
-
getOpacity
public float getOpacity()
-
setOpacity
public void setOpacity(float opacity)
-
setCoords
public void setCoords(int imgWidth, int imgHeight, int wmWidth, int wmHeight)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-