public enum Origin extends Enum<Origin>
This class is Thread-Safe.
Enum Constant and Description |
---|
BOTTOM_LEFT
Bottom left origin point.
|
BOTTOM_RIGHT
Bottom right origin point.
|
CENTER_BOTTOM
Center bottom origin point.
|
CENTER_TOP
Center bottom origin point.
|
MIDDLE
Center center origin point.
|
TOP_LEFT
Top left origin point.
|
Modifier and Type | Method and Description |
---|---|
double |
getX(double x,
double width)
Get the x relative to origin.
|
double |
getY(double y,
double height)
Get the y relative to origin.
|
static Origin |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Origin[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Origin TOP_LEFT
public static final Origin BOTTOM_LEFT
public static final Origin BOTTOM_RIGHT
public static final Origin MIDDLE
public static final Origin CENTER_TOP
public static final Origin CENTER_BOTTOM
public static Origin[] values()
for (Origin c : Origin.values()) System.out.println(c);
public static Origin valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic double getX(double x, double width)
x
- The current horizontal value.width
- The width size.public double getY(double y, double height)
y
- The current vertical value.height
- The height size.Copyright © 2016 Byron 3D Games Studio. All rights reserved.