com.groupdocs.watermark

Interfaces

Classes

Exceptions

com.groupdocs.watermark

Class Watermark

    • Method Summary

      Methods 
      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 Watermark.
      int getHorizontalAlignment()
      Gets the horizontal alignment of this Watermark.
      Margins getMargins()
      Gets the margin settings of this Watermark.
      double getOpacity()
      Gets the opacity of this Watermark.
      double getRotateAngle()
      Gets the rotate angle of this Watermark 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 Watermark.
      double getWidth()
      Gets the desired width of this Watermark.
      double getX()
      Gets the x-coordinate of this Watermark.
      double getY()
      Gets the y-coordinate of this Watermark.
      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 Watermark.
      void setHorizontalAlignment(int value)
      Sets the horizontal alignment of this Watermark.
      void setMargins(Margins value)
      Sets the margin settings of this Watermark.
      void setOpacity(double value)
      Sets the opacity of this Watermark.
      void setRotateAngle(double value)
      Sets the rotate angle of this Watermark 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 Watermark.
      void setWidth(double value)
      Sets the desired width of this Watermark.
      void setX(double value)
      Sets the x-coordinate of this Watermark.
      void setY(double value)
      Sets the y-coordinate of this Watermark.
    • Method Detail

      • getOpacity

        public final double getOpacity()

        Gets the opacity of this Watermark.

        Returns:
        The opacity of this Watermark. The value should be between 0 and 1. Default value is 1.
      • setOpacity

        public final void setOpacity(double value)

        Sets the opacity of this Watermark.

        Parameters:
        value - The opacity of this Watermark. The value should be between 0 and 1. Default value is 1.
      • getY

        public final double getY()

        Gets the y-coordinate of this Watermark.

        Returns:
        The y-coordinate of this Watermark.
      • setY

        public final void setY(double value)

        Sets the y-coordinate of this Watermark.

        Parameters:
        value - The y-coordinate of this Watermark.
      • getX

        public final double getX()

        Gets the x-coordinate of this Watermark.

        Returns:
        The x-coordinate of this Watermark.
      • setX

        public final void setX(double value)

        Sets the x-coordinate of this Watermark.

        Parameters:
        value - The x-coordinate of this Watermark.
      • getVerticalAlignment

        public final int getVerticalAlignment()

        Gets the vertical alignment of this Watermark.

        Returns:
        The vertical alignment of this Watermark. Default value is F:VerticalAlignment.None.
      • setVerticalAlignment

        public final void setVerticalAlignment(int value)

        Sets the vertical alignment of this Watermark.

        Parameters:
        value - The vertical alignment of this Watermark. Default value is F:VerticalAlignment.None.
      • getHorizontalAlignment

        public final int getHorizontalAlignment()

        Gets the horizontal alignment of this Watermark.

        Returns:
        The horizontal alignment of this Watermark. Default value is F:HorizontalAlignment.None.
      • setHorizontalAlignment

        public final void setHorizontalAlignment(int value)

        Sets the horizontal alignment of this Watermark.

        Parameters:
        value - The horizontal alignment of this Watermark. Default value is F:HorizontalAlignment.None.
      • getRotateAngle

        public final double getRotateAngle()

        Gets the rotate angle of this Watermark in degrees.

        Returns:
        The rotate angle of this Watermark in degrees.
      • setRotateAngle

        public final void setRotateAngle(double value)

        Sets the rotate angle of this Watermark in degrees.

        Parameters:
        value - The rotate angle of this Watermark in degrees.
      • isBackground

        public final boolean isBackground()

        Gets a value indicating whether the watermark should be placed at background.

        Returns:
        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.
      • setBackground

        public final void setBackground(boolean value)

        Sets a value indicating whether the watermark should be placed at background.

        Parameters:
        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.
      • getMargins

        public final Margins getMargins()

        Gets the margin settings of this Watermark.

        Returns:
        The margin settings of this Watermark.
      • setMargins

        public final void setMargins(Margins value)

        Sets the margin settings of this Watermark.

        Parameters:
        value - The margin settings of this Watermark.
      • getHeight

        public final double getHeight()

        Gets the desired height of this Watermark. Setting this property will also change the value of SizingType property to F:SizingType.Absolute.

        Returns:
        The desired height of this Watermark.
      • setHeight

        public final void setHeight(double value)

        Sets the desired height of this Watermark. Setting this property will also change the value of SizingType property to F:SizingType.Absolute.

        Parameters:
        value - The desired height of this Watermark.
      • getWidth

        public final double getWidth()

        Gets the desired width of this Watermark. Setting this property will also change the value of SizingType property to F:SizingType.Absolute.

        Returns:
        The desired width of this Watermark.
      • setWidth

        public final void setWidth(double value)

        Sets the desired width of this Watermark. Setting this property will also change the value of SizingType property to F:SizingType.Absolute.

        Parameters:
        value - The desired width of this Watermark.
      • getScaleFactor

        public final double getScaleFactor()

        Gets a value that defines how watermark size depends on parent size.

        Returns:
        The value must be between 0.0 and 1.0.
      • setScaleFactor

        public final void setScaleFactor(double value)

        Sets a value that defines how watermark size depends on parent size.

        Parameters:
        value - The value must be between 0.0 and 1.0.
      • getSizingType

        public final int getSizingType()

        Gets a value specifying a way watermark should be sized.

        Returns:
        The sizing type.
      • setSizingType

        public final void setSizingType(int value)

        Sets a value specifying a way watermark should be sized.

        Parameters:
        value - The sizing type.
      • getConsiderParentMargins

        public final boolean getConsiderParentMargins()

        Gets a value indicating whether the watermark size and coordinates are calculated considering parent margins.

        Returns:
        If the value is true, watermark size and coordinates are calculated considering parent margins. By default, the value is false, parent margins are ignored.
      • setConsiderParentMargins

        public final void setConsiderParentMargins(boolean value)

        Sets a value indicating whether the watermark size and coordinates are calculated considering parent margins.

        Parameters:
        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.