public class WZColor extends Object implements Comparable<WZColor>
Modifier and Type | Field and Description |
---|---|
float |
alpha |
static WZColor |
BLACK |
float |
blue |
static WZColor |
BLUE |
static WZColor |
CYAN |
static WZColor |
DARKGREY |
float |
green |
static WZColor |
GREEN |
static WZColor |
GREY |
static WZColor |
LIGHTGREY |
static WZColor |
MAGENTA |
static WZColor |
ORANGE |
float |
red |
static WZColor |
RED |
static WZColor |
WHITE
Identifiers for a stndard set of colors
|
static WZColor |
YELLOW |
Constructor and Description |
---|
WZColor()
Construct a new instance (white by default, fully opaque)
|
WZColor(float r,
float g,
float b)
Construct a new instance using the specified property values
|
WZColor(float r,
float g,
float b,
float a)
Construct a new instance using the specified property values
|
WZColor(int r,
int g,
int b)
Construct a new instance using the specified property values
|
WZColor(int r,
int g,
int b,
int a)
Construct a new instance using the specified property values
|
WZColor(WZColor other)
Construct a new instance using the property values from the specified instance
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(WZColor other)
Compare this instance to another
|
boolean |
equals(Object other) |
static WZColor |
fromPacked(int packedColor)
Converts a packed color into a
WZColor |
static int |
packedColor(float r,
float g,
float b,
float a) |
void |
set(float r,
float g,
float b)
Set the values of this instance using the specified property values
|
void |
set(float r,
float g,
float b,
float a)
Set the values of this instance using the specified property values
|
void |
set(int packedColor)
Set the values of this instance using the specified packed integer
|
void |
set(WZColor other)
Update the property values of this instance with the property values from the specified instance
|
float[] |
toArray() |
int |
toPacked() |
String |
toString()
Returns a human readable representation
|
boolean |
validate()
Validate tje values in this instance
|
static boolean |
validateColor(float r,
float g,
float b,
float a)
Validate a set of color values
|
public static final WZColor WHITE
public static final WZColor BLACK
public static final WZColor GREY
public static final WZColor DARKGREY
public static final WZColor LIGHTGREY
public static final WZColor RED
public static final WZColor GREEN
public static final WZColor BLUE
public static final WZColor YELLOW
public static final WZColor CYAN
public static final WZColor MAGENTA
public static final WZColor ORANGE
public float red
public float green
public float blue
public float alpha
public WZColor(float r, float g, float b, float a)
r
- the red componentg
- the green componentb
- the blue componenta
- the alpha componentpublic WZColor(float r, float g, float b)
r
- the red componentg
- the green componentb
- the blue componentpublic WZColor(int r, int g, int b, int a)
r
- the red componentg
- the green componentb
- the blue componenta
- the alpha componentpublic WZColor(int r, int g, int b)
r
- the red componentg
- the green componentb
- the blue componentpublic WZColor()
public WZColor(WZColor other)
other
- The instance to replicatepublic static int packedColor(float r, float g, float b, float a)
r
- the red componentg
- the green componentb
- the blue componenta
- the alpha componentpublic static WZColor fromPacked(int packedColor)
WZColor
packedColor
- the packed colorWZColor
instancepublic static boolean validateColor(float r, float g, float b, float a)
r
- the red componentg
- the green componentb
- the blue componenta
- the alpha componentpublic void set(WZColor other)
other
- The instance with the property values to replicatepublic void set(float r, float g, float b, float a)
r
- g
- b
- a
- public void set(float r, float g, float b)
r
- g
- b
- public void set(int packedColor)
packedColor
- a packed integer representation whose values to copypublic float[] toArray()
public int toPacked()
public boolean validate()
public boolean equals(Object other)
public String toString()
public int compareTo(WZColor other)
compareTo
in interface Comparable<WZColor>
other
- the instance for comparison© 2016 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal