Package tripleplay.ui.util
Class Scale9.Axis
java.lang.Object
tripleplay.ui.util.Scale9.Axis
- Enclosing class:
Scale9
A horizontal or vertical axis, broken up into 3 chunks.
-
Constructor Summary
ConstructorDescriptionAxis
(float length) Creates a new axis equally splitting the given length.Axis
(float length, Scale9.Axis src) Creates a new axis with the given total length and 0th and 2nd lengths copied from a source axis. -
Method Summary
Modifier and TypeMethodDescriptionfloat
coord
(int idx) Returns the coordinate of the given chunk, 0 - 2.resize
(int idx, float size) Sets the size of the given chunk, shifting neighbors.set
(int idx, float coord, float size) Sets the size and location of the given chunk, 0 - 2.float
size
(int idx) Returns the size of the given chunk, 0 - 2.
-
Constructor Details
-
Axis
public Axis(float length) Creates a new axis equally splitting the given length. -
Axis
Creates a new axis with the given total length and 0th and 2nd lengths copied from a source axis.
-
-
Method Details
-
coord
public float coord(int idx) Returns the coordinate of the given chunk, 0 - 2. -
size
public float size(int idx) Returns the size of the given chunk, 0 - 2. -
set
Sets the size and location of the given chunk, 0 - 2. -
resize
Sets the size of the given chunk, shifting neighbors.
-