com.groupdocs.watermark.watermarks

Class Margins



  • public class Margins
    extends Object

    Represents margin settings for each edge of an object.

    • Constructor Detail

      • Margins

        public Margins()
        Initializes a new instance of the Margins class.
      • Margins

        public Margins(int marginType,
               double left,
               double right,
               double top,
               double bottom)
        Initializes a new instance of the Margins class with the specified type, location and size.
        Parameters:
        marginType - The MarginType. Specifies how margin values should be interpreted.
        left - The left margin value.
        right - The right margin value.
        top - The top margin value.
        bottom - The bottom margin value.
    • Method Detail

      • getMarginType

        public final int getMarginType()
        Gets MarginType. Setting a new value to this property automatically returns all margins to their default values (zero).

        The default value is MarginType.Absolute

        Returns:
        The value specifying how margins should be interpreted.
      • setMarginType

        public final void setMarginType(int value)
        Sets MarginType. Setting a new value to this property automatically returns all margins to their default values (zero).

        The default value is MarginType.Absolute

        Parameters:
        value - The value specifying how margins should be interpreted.
      • getLeft

        public final double getLeft()

        Gets the left margin.

        Returns:
        Horizontal offset from parent left border.
      • setLeft

        public final void setLeft(double value)

        Sets the left margin.

        Parameters:
        value - Horizontal offset from parent left border.
      • getRight

        public final double getRight()

        Gets the right margin.

        Returns:
        Horizontal offset from parent right border.
      • setRight

        public final void setRight(double value)

        Sets the right margin.

        Parameters:
        value - Horizontal offset from parent right border.
      • getTop

        public final double getTop()

        Gets the top margin.

        Returns:
        Horizontal offset from parent top border.
      • setTop

        public final void setTop(double value)

        Sets the top margin.

        Parameters:
        value - Horizontal offset from parent top border.
      • getBottom

        public final double getBottom()

        Gets the bottom margin.

        Returns:
        Horizontal offset from parent bottom border.
      • setBottom

        public final void setBottom(double value)

        Sets the bottom margin.

        Parameters:
        value - Horizontal offset from parent bottom border.