Enum GUIObject.ScaleType
- All Implemented Interfaces:
Serializable, Comparable<GUIObject.ScaleType>
- Enclosing class:
GUIObject
Skin scaling type.
- Author:
- Matthew Tropiano
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract floatgetTextureScaleS(GUIObject object) Get the texture S-scaling according to the object.abstract floatgetTextureScaleT(GUIObject object) Get the texture T-scaling according to the object.static GUIObject.ScaleTypeReturns the enum constant of this type with the specified name.static GUIObject.ScaleType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NORMAL
No scaling. -
ASPECT
Scaling is according to object's dimensional aspect. Most effective for square textures. Example: if XY dimensions are [200, 100], ST scaling is [2, 1]. Example: if XY dimensions are [100, 200], ST scaling is [1, 2]. -
ADJUST_X
Scaling is according to object's height. Most effective for square textures. Example: if XY dimensions are [200, 100], ST scaling is [2, 1]. Example: if XY dimensions are [100, 200], ST scaling is [.5, 1]. -
ADJUST_Y
Scaling is according to object's width. Most effective for square textures. Example: if XY dimensions are [200, 100], ST scaling is [1, .5]. Example: if XY dimensions are [100, 200], ST scaling is [1, 2].
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getTextureScaleS
Get the texture S-scaling according to the object.- Parameters:
object- the object to use.- Returns:
- the texture scaling.
-
getTextureScaleT
Get the texture T-scaling according to the object.- Parameters:
object- the object to use.- Returns:
- the texture scaling.
-