Package com.github.weisj.jsvg.attributes
Enum PreserveAspectRatio.Align
- java.lang.Object
-
- java.lang.Enum<PreserveAspectRatio.Align>
-
- com.github.weisj.jsvg.attributes.PreserveAspectRatio.Align
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PreserveAspectRatio.Align>
- Enclosing class:
- PreserveAspectRatio
public static enum PreserveAspectRatio.Align extends java.lang.Enum<PreserveAspectRatio.Align>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description None
Do not force uniform scaling.xMaxYMax
Force uniform scaling.xMaxYMid
Force uniform scaling.xMaxYMin
Force uniform scaling.xMidYMax
Force uniform scaling.xMidYMid
Force uniform scaling.xMidYMin
Force uniform scaling.xMinYMax
Force uniform scaling.xMinYMid
Force uniform scaling.xMinYMin
Force uniform scaling.
-
Field Summary
Fields Modifier and Type Field Description private @NotNull PreserveAspectRatio.AlignType
xAlign
private @NotNull PreserveAspectRatio.AlignType
yAlign
-
Constructor Summary
Constructors Modifier Constructor Description private
Align(@NotNull PreserveAspectRatio.AlignType xAlign, @NotNull PreserveAspectRatio.AlignType yAlign)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
static PreserveAspectRatio.Align
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PreserveAspectRatio.Align[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
None
public static final PreserveAspectRatio.Align None
Do not force uniform scaling. Scale the graphic content of the given element non-uniformly if necessary such that the element's bounding box exactly matches the viewport rectangle. Note that if [align] is none, then the optional [meetOrSlice] value is ignored.
-
xMinYMin
public static final PreserveAspectRatio.Align xMinYMin
Force uniform scaling. Align the [min-x] of the element's viewBox with the smallest X value of the viewport. Align the [min-y] of the element's viewBox with the smallest Y value of the viewport.
-
xMidYMin
public static final PreserveAspectRatio.Align xMidYMin
Force uniform scaling. Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. Align the [min-y] of the element's viewBox with the smallest Y value of the viewport.
-
xMaxYMin
public static final PreserveAspectRatio.Align xMaxYMin
Force uniform scaling. Align the [min-x]+[width] of the element's viewBox with the maximum X value of the viewport. Align the [min-y] of the element's viewBox with the smallest Y value of the viewport.
-
xMinYMid
public static final PreserveAspectRatio.Align xMinYMid
Force uniform scaling. Align the [min-x] of the element's viewBox with the smallest X value of the viewport. Align the midpoint Y value of the element's viewBox with the midpoint Y value of the viewport.
-
xMidYMid
public static final PreserveAspectRatio.Align xMidYMid
Force uniform scaling. Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. Align the midpoint Y value of the element's viewBox with the midpoint Y value of the viewport.
-
xMaxYMid
public static final PreserveAspectRatio.Align xMaxYMid
Force uniform scaling. Align the [min-x]+[width] of the element's viewBox with the maximum X value of the viewport. Align the midpoint Y value of the element's viewBox with the midpoint Y value of the viewport.
-
xMinYMax
public static final PreserveAspectRatio.Align xMinYMax
Force uniform scaling. Align the [min-x] of the element's viewBox with the smallest X value of the viewport. Align the [min-y]+[height] of the element's viewBox with the maximum Y value of the viewport.
-
xMidYMax
public static final PreserveAspectRatio.Align xMidYMax
Force uniform scaling. Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. Align the [min-y]+[height] of the element's viewBox with the maximum Y value of the viewport.
-
xMaxYMax
public static final PreserveAspectRatio.Align xMaxYMax
Force uniform scaling. Align the [min-x]+[width] of the element's viewBox with the maximum X value of the viewport. Align the [min-y]+[height] of the element's viewBox with the maximum Y value of the viewport.
-
-
Field Detail
-
xAlign
@NotNull private final @NotNull PreserveAspectRatio.AlignType xAlign
-
yAlign
@NotNull private final @NotNull PreserveAspectRatio.AlignType yAlign
-
-
Constructor Detail
-
Align
private Align(@NotNull @NotNull PreserveAspectRatio.AlignType xAlign, @NotNull @NotNull PreserveAspectRatio.AlignType yAlign)
-
-
Method Detail
-
values
public static PreserveAspectRatio.Align[] 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.Align c : PreserveAspectRatio.Align.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.Align 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<PreserveAspectRatio.Align>
-
-