Package playn.core
Class Tint
java.lang.Object
playn.core.Tint
Tinting related utility methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA tint that does not change the underlying color. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcombine(int curTint, int tint) Returns the combination ofcurTintandtint.static floatgetAlpha(int tint) Returns the alpha component oftintas a float between[0, 1].static intsetAlpha(int tint, float alpha) Sets the alpha component oftinttoalpha.
-
Field Details
-
NOOP_TINT
public static final int NOOP_TINTA tint that does not change the underlying color.- See Also:
-
-
Constructor Details
-
Tint
public Tint()
-
-
Method Details
-
combine
public static int combine(int curTint, int tint) Returns the combination ofcurTintandtint. -
setAlpha
public static int setAlpha(int tint, float alpha) Sets the alpha component oftinttoalpha.- Returns:
- the new tint.
-
getAlpha
public static float getAlpha(int tint) Returns the alpha component oftintas a float between[0, 1].
-