Enum PreserveAspectRatio.MeetOrSlice
- java.lang.Object
-
- java.lang.Enum<PreserveAspectRatio.MeetOrSlice>
-
- com.github.weisj.jsvg.attributes.PreserveAspectRatio.MeetOrSlice
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PreserveAspectRatio.MeetOrSlice>
- Enclosing class:
- PreserveAspectRatio
public static enum PreserveAspectRatio.MeetOrSlice extends java.lang.Enum<PreserveAspectRatio.MeetOrSlice>
-
-
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.
-
-
-
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).
-
-
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 namejava.lang.NullPointerException
- if the argument is null
-
-