Class Image.Options

java.lang.Object
com.syzygy.events.database.Image.Options
Enclosing class:
Image

public static class Image.Options extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    A list of predefined sizes
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private final boolean
     
    private final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Options(int width, int height, boolean isCircle)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the image as is
    Circle(int size)
    Returns the image resized to a size*size square then cropped to the largest circle that fits within
    Returns the image cropped to the largest circle that can fit within the image
    void
    modifyImage(com.squareup.picasso.RequestCreator img)
    Modifies the image based off the parameters of the option
    Square(int size)
    Returns the image resized to size*size

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • width

      private final int width
    • height

      private final int height
    • isCircle

      private final boolean isCircle
  • Constructor Details

    • Options

      public Options(int width, int height, boolean isCircle)
  • Method Details

    • modifyImage

      public void modifyImage(com.squareup.picasso.RequestCreator img)
      Modifies the image based off the parameters of the option
      Parameters:
      img - The image to modify
    • Square

      public static Image.Options Square(int size)
      Returns the image resized to size*size
      Parameters:
      size - The width and height of the image
    • LargestCircle

      public static Image.Options LargestCircle()
      Returns the image cropped to the largest circle that can fit within the image
    • Circle

      public static Image.Options Circle(int size)
      Returns the image resized to a size*size square then cropped to the largest circle that fits within
      Parameters:
      size - the diameter of the circle
    • AsIs

      public static Image.Options AsIs()
      Returns the image as is