public class LibgdxReadOnlyColor extends LibgdxColor
color
Constructor and Description |
---|
LibgdxReadOnlyColor(byte r,
byte g,
byte b,
byte a) |
LibgdxReadOnlyColor(com.badlogic.gdx.graphics.Color color) |
LibgdxReadOnlyColor(float r,
float g,
float b,
float a) |
LibgdxReadOnlyColor(int rgba8888) |
LibgdxReadOnlyColor(int r,
int g,
int b,
int a) |
Modifier and Type | Method and Description |
---|---|
Color |
add(byte r,
byte g,
byte b,
byte a)
Adds RGBA components to this
Color |
Color |
add(Color color)
|
Color |
add(float r,
float g,
float b,
float a)
Adds RGBA components to this
Color |
Color |
lerp(byte r,
byte g,
byte b,
byte a,
float t)
Linearly interpolates between this color and the target color by t
|
Color |
lerp(Color color,
float t)
Linearly interpolates between this color and the target color by t
|
Color |
lerp(float r,
float g,
float b,
float a,
float t)
Linearly interpolates between this color and the target color by t
|
Color |
multiply(byte r,
byte g,
byte b,
byte a)
Multiplies this
Color by the given RGBA components |
Color |
multiply(Color color)
|
Color |
multiply(float multiplier)
Multiplies this
Color by the given multiplier |
Color |
multiply(float r,
float g,
float b,
float a)
Multiplies this
Color by the given RGBA components |
Color |
set(byte r,
byte g,
byte b,
byte a)
Sets the RGBA components
|
Color |
set(Color color)
|
Color |
set(float r,
float g,
float b,
float a)
Sets the RGBA components
|
void |
setA(byte a) |
void |
setA(float a)
Sets the alpha component
|
void |
setB(byte b) |
void |
setB(float b)
Sets the blue component
|
void |
setG(byte g) |
void |
setG(float g)
Sets the green component
|
void |
setR(byte r) |
void |
setR(float r)
Sets the red component
|
Color |
subtract(byte r,
byte g,
byte b,
byte a)
Subtracts RGBA components from this
Color |
Color |
subtract(Color color)
|
Color |
subtract(float r,
float g,
float b,
float a)
Subtracts RGBA components from this
Color |
ab, af, argb8888, bb, bf, bgr565, bgra4444, copy, equals, gb, getAAsByte, getAAsFloat, getBAsByte, getBAsFloat, getGAsByte, getGAsFloat, getRAsByte, getRAsFloat, gf, rb, rf, rgb565, rgb888, rgba4444, rgba8888
public LibgdxReadOnlyColor(int rgba8888)
public LibgdxReadOnlyColor(int r, int g, int b, int a)
public LibgdxReadOnlyColor(float r, float g, float b, float a)
public LibgdxReadOnlyColor(byte r, byte g, byte b, byte a)
public LibgdxReadOnlyColor(com.badlogic.gdx.graphics.Color color)
public Color set(Color color)
Color
set
in interface Color
set
in class LibgdxColor
Color
for chainingpublic Color set(byte r, byte g, byte b, byte a)
Color
set
in interface Color
set
in class LibgdxColor
r
- The red component (between 0 and 255)g
- The green component (between 0 and 255)b
- The blue component (between 0 and 255)a
- The alpha component (between 0 and 255)Color
for chainingpublic Color set(float r, float g, float b, float a)
Color
set
in interface Color
set
in class LibgdxColor
r
- The red component (between 0.0 and 1.0)g
- The green component (between 0.0 and 1.0)b
- The blue component (between 0.0 and 1.0)a
- The alpha component (between 0.0 and 1.0)Color
for chainingpublic void setR(byte r)
setR
in interface Color
setR
in class LibgdxColor
public void setR(float r)
Color
setR
in interface Color
setR
in class LibgdxColor
r
- A value between 0f and 1fpublic void setG(byte g)
setG
in interface Color
setG
in class LibgdxColor
public void setG(float g)
Color
setG
in interface Color
setG
in class LibgdxColor
g
- A value between 0f and 1fpublic void setB(byte b)
setB
in interface Color
setB
in class LibgdxColor
public void setB(float b)
Color
setB
in interface Color
setB
in class LibgdxColor
b
- A value between 0f and 1fpublic void setA(byte a)
setA
in interface Color
setA
in class LibgdxColor
public void setA(float a)
Color
setA
in interface Color
setA
in class LibgdxColor
a
- A value between 0f and 1fpublic Color add(byte r, byte g, byte b, byte a)
Color
Color
add
in interface Color
add
in class LibgdxColor
r
- The red component (between 0 and 255)g
- The green component (between 0 and 255)b
- The blue component (between 0 and 255)a
- The alpha component (between 0 and 255)Color
for chainingpublic Color add(float r, float g, float b, float a)
Color
Color
add
in interface Color
add
in class LibgdxColor
r
- The red component (between 0.0 and 1.0)g
- The green component (between 0.0 and 1.0)b
- The blue component (between 0.0 and 1.0)a
- The alpha component (between 0.0 and 1.0)Color
for chainingpublic Color multiply(float multiplier)
Color
Color
by the given multipliermultiply
in interface Color
multiply
in class LibgdxColor
multiplier
- The value to multiply the RGBA components byColor
for chainingpublic Color multiply(byte r, byte g, byte b, byte a)
Color
Color
by the given RGBA componentsmultiply
in interface Color
multiply
in class LibgdxColor
r
- The red component (between 0 and 255)g
- The green component (between 0 and 255)b
- The blue component (between 0 and 255)a
- The alpha component (between 0 and 255)Color
for chainingpublic Color multiply(float r, float g, float b, float a)
Color
Color
by the given RGBA componentsmultiply
in interface Color
multiply
in class LibgdxColor
r
- The red component (between 0.0 and 1.0)g
- The green component (between 0.0 and 1.0)b
- The blue component (between 0.0 and 1.0)a
- The alpha component (between 0.0 and 1.0)Color
for chainingpublic Color subtract(byte r, byte g, byte b, byte a)
Color
Color
subtract
in interface Color
subtract
in class LibgdxColor
r
- The red component (between 0 and 255)g
- The green component (between 0 and 255)b
- The blue component (between 0 and 255)a
- The alpha component (between 0 and 255)Color
for chainingpublic Color subtract(float r, float g, float b, float a)
Color
Color
subtract
in interface Color
subtract
in class LibgdxColor
r
- The red component (between 0.0 and 1.0)g
- The green component (between 0.0 and 1.0)b
- The blue component (between 0.0 and 1.0)a
- The alpha component (between 0.0 and 1.0)Color
for chainingpublic Color lerp(Color color, float t)
Color
public Color lerp(byte r, byte g, byte b, byte a, float t)
Color
lerp
in interface Color
lerp
in class LibgdxColor
r
- The red component of the target Color
(A value between 0 and 255)g
- The green component of the target Color
(A value between 0 and 255)b
- The blue component of the target Color
(A value between 0 and 255)a
- The alpha component of the target Color
(A value between 0 and 255)t
- The interpolation coefficientColor
for chainingpublic Color lerp(float r, float g, float b, float a, float t)
Color
lerp
in interface Color
lerp
in class LibgdxColor
r
- The red component of the target Color
(A value between 0.0. and 1.0)g
- The green component of the target Color
(A value between 0.0. and 1.0)b
- The blue component of the target Color
(A value between 0.0. and 1.0)a
- The alpha component of the target Color
(A value between 0.0. and 1.0)t
- The interpolation coefficientColor
for chaining