Class CropSourceOptions

    • Constructor Detail

      • CropSourceOptions

        public CropSourceOptions()
    • Method Detail

      • getHeight

        public int getHeight()
        Gets the height of the cropped image. By default this is in pixels but if isPercentageCrop is set to true then it changes to percentage.
        Returns:
        the height
      • setHeight

        public void setHeight​(int height)
        Sets the height of the cropped image. By default this is in pixels but if isPercentageCrop is set to true then it changes to percentage.
        Parameters:
        height - the height to set
      • getWidth

        public int getWidth()
        Sets the width of the cropped image. By default this is in pixels but if isPercentageCrop is set to true then it changes to percentage.
        Returns:
        the width
      • setWidth

        public void setWidth​(int width)
        Sets the width of the cropped image. By default this is in pixels but if isPercentageCrop is set to true then it changes to percentage.
        Parameters:
        width - the width to set
      • getXOffset

        public int getXOffset()
        Gets the horizontal offset. By default this starts fromt he top-left corner of the image and moves right, however the gravity property can change this.
        Returns:
        the xOffset
      • setXOffset

        public void setXOffset​(int xOffset)
        Sets the horizontal offset. By default this starts fromt he top-left corner of the image and moves right, however the gravity property can change this.
        Parameters:
        xOffset - the xOffset to set
      • getYOffset

        public int getYOffset()
        Gets the vertical offset. By default this starts fromt he top-left corner of the image and moves down, however the gravity property can change this.
        Returns:
        the yOffset
      • setYOffset

        public void setYOffset​(int yOffset)
        Sets the vertical offset. By default this starts fromt he top-left corner of the image and moves down, however the gravity property can change this.
        Parameters:
        yOffset - the yOffset to set
      • isPercentageCrop

        public boolean isPercentageCrop()
        Returns:
        the isPercentageCrop
      • setPercentageCrop

        public void setPercentageCrop​(boolean isPercentageCrop)
        Parameters:
        isPercentageCrop - the isPercentageCrop to set
      • setGravity

        public void setGravity​(java.lang.String gravity)
        Sets the 'gravity' which determines how the offset is applied. It affects both the origin of offset and the direction(s).
        Parameters:
        gravity - the gravity to set
      • getGravity

        public java.lang.String getGravity()
        Gets the 'gravity' which determines how the offset is applied. It affects both the origin of offset and the direction(s).
        Returns:
        the gravity
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object