Enum PreserveAspectRatio.MeetOrSlice

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Meet
      Scale the graphic such that:
      Slice
      Scale the graphic such that:
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MeetOrSlice()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PreserveAspectRatio.MeetOrSlice valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PreserveAspectRatio.MeetOrSlice[] 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

      • Meet

        public static final PreserveAspectRatio.MeetOrSlice Meet
        Scale the graphic such that:

        - aspect ratio is preserved - the entire viewBox is visible within the viewport - the viewBox is scaled up as much as possible, while still meeting the other criteria

        In this case, if the aspect ratio of the graphic does not match the viewport, some viewport will extend beyond the bounds of the viewBox (i.e., the area into which the viewBox will draw will be smaller than the viewport).

      • Slice

        public static final PreserveAspectRatio.MeetOrSlice Slice
        Scale the graphic such that:

        - aspect ratio is preserved - the entire viewport is covered by the viewBox - the viewBox is scaled down as much as possible, while still meeting the other criteria

        In this case, if the aspect ratio of the viewBox does not match the viewport, some viewBox will extend beyond the bounds of the viewport (i.e., the area into which the viewBox will draw is larger than the viewport).

    • Constructor Detail

      • MeetOrSlice

        private MeetOrSlice()
    • Method Detail

      • values

        public static PreserveAspectRatio.MeetOrSlice[] 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 (PreserveAspectRatio.MeetOrSlice c : PreserveAspectRatio.MeetOrSlice.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PreserveAspectRatio.MeetOrSlice 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