Package playn.core
Class Tint
java.lang.Object
playn.core.Tint
Tinting related utility methods.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
A tint that does not change the underlying color. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
combine
(int curTint, int tint) Returns the combination ofcurTint
andtint
.static float
getAlpha
(int tint) Returns the alpha component oftint
as a float between[0, 1]
.static int
setAlpha
(int tint, float alpha) Sets the alpha component oftint
toalpha
.
-
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 ofcurTint
andtint
. -
setAlpha
public static int setAlpha(int tint, float alpha) Sets the alpha component oftint
toalpha
.- Returns:
- the new tint.
-
getAlpha
public static float getAlpha(int tint) Returns the alpha component oftint
as a float between[0, 1]
.
-