Enum PageFit

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PageFit>

    public enum PageFit
    extends java.lang.Enum<PageFit>
    Page fit.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      FILL_IN
      Fill page with image.
      FIT_IN
      Fit image into page.
      NONE
      No resizing, centers the image on the page.
      STRETCH
      Stretch image to fill the entire page.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PageFit valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PageFit[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • FIT_IN

        public static final PageFit FIT_IN
        Fit image into page. May leave white borders if the aspect ratio of the image and the page don't match. Preserves image aspect ratio.
      • FILL_IN

        public static final PageFit FILL_IN
        Fill page with image. Will crop the image if the aspect ratio of the image and the page don't match. Preserves image aspect ratio.
      • STRETCH

        public static final PageFit STRETCH
        Stretch image to fill the entire page. The image will never be cropped and there will never be any white borders left, but the image aspect ratio will be made to match the page aspect ratio.
      • NONE

        public static final PageFit NONE
        No resizing, centers the image on the page. The physical size of the image will be determined by the `dpi` parameter.
    • Method Detail

      • values

        public static PageFit[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PageFit c : PageFit.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PageFit valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null