Package playn.core

Class Tint

java.lang.Object
playn.core.Tint

public class Tint extends Object
Tinting related utility methods.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    A tint that does not change the underlying color.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    combine(int curTint, int tint)
    Returns the combination of curTint and tint.
    static float
    getAlpha(int tint)
    Returns the alpha component of tint as a float between [0, 1].
    static int
    setAlpha(int tint, float alpha)
    Sets the alpha component of tint to alpha.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NOOP_TINT

      public static final int NOOP_TINT
      A 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 of curTint and tint.
    • setAlpha

      public static int setAlpha(int tint, float alpha)
      Sets the alpha component of tint to alpha.
      Returns:
      the new tint.
    • getAlpha

      public static float getAlpha(int tint)
      Returns the alpha component of tint as a float between [0, 1].