Class Watermark

java.lang.Object
com.day.cq.dam.commons.watermark.Watermark
Direct Known Subclasses:
ImageWatermark

public abstract class Watermark extends Object
A Watermark 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 a Location or using top, left values.
If specified as a Location, it is transformed to x,y using image height,width values at the time of application of the watermark.
  • Field Details

    • DEFAULT_LOCATION

      public static final Location DEFAULT_LOCATION
    • DEFAULT_ORIENTATION

      public static final double DEFAULT_ORIENTATION
      See Also:
    • DEFAULT_OPACITY

      public static final float DEFAULT_OPACITY
      See Also:
  • Method Details

    • 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 String toString()
      Overrides:
      toString in class Object