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.ObjectAWatermarkobject 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 aLocationor 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 LocationDEFAULT_LOCATIONstatic floatDEFAULT_OPACITYstatic doubleDEFAULT_ORIENTATION
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLeft()floatgetOpacity()doublegetOrientation()LocationgetPosition()intgetTop()voidsetCoords(int imgWidth, int imgHeight, int wmWidth, int wmHeight)voidsetLeft(int left)voidsetOpacity(float opacity)voidsetOrientation(int orientation)voidsetPosition(Location position)voidsetTop(int top)java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
-