Skip to main content

FlixelColorable

View source

interface

org.flixelgdx.functional.FlixelColorable

public interface FlixelColorable

Something with a tint you can read or write as either a libGDX Color or a FlixelColor wrapper. Implementations should keep both APIs in sync on the same backing RGBA.

See Also: FlixelSprite

Methods

getColor()

public int getColor()

Returns: Packed RGBA8888 tint (see Color.rgba8888(...)).


getGdxColor()

public Color getGdxColor()

Returns: The backing libGDX color (often mutable). Must not be null.


setColor(Color)

public void setColor(Color color)

Copies RGBA from color into this tint.

Parameters:

NameDescription
colorThe color to copy. Must not be null.

setColor(FlixelColor)

public void setColor(FlixelColor color)

Copies RGBA from color into this tint.

Parameters:

NameDescription
colorThe wrapper to copy from. Must not be null.