Enum PreserveAspectRatio.MeetOrSlice

java.lang.Object
java.lang.Enum<PreserveAspectRatio.MeetOrSlice>
com.github.weisj.jsvg.attributes.PreserveAspectRatio.MeetOrSlice
All Implemented Interfaces:
Serializable, Comparable<PreserveAspectRatio.MeetOrSlice>, java.lang.constant.Constable
Enclosing class:
PreserveAspectRatio

public static enum PreserveAspectRatio.MeetOrSlice extends Enum<PreserveAspectRatio.MeetOrSlice>
  • Enum Constant Details

    • 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 Details

    • MeetOrSlice

      private MeetOrSlice()
  • Method Details

    • values

      public static PreserveAspectRatio.MeetOrSlice[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PreserveAspectRatio.MeetOrSlice valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null