Package com.myscript.iink.graphics
Class Color
java.lang.Object
com.myscript.iink.graphics.Color
Red green blue alpha color representation.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal int
a()
Returns the alpha channel value.final float
a_f()
Returns the normalised aslpha channel value.final int
b()
Returns the blue channel value.final float
b_f()
Returns the normalised blue channel value.boolean
final int
g()
Returns the green channel value.final float
g_f()
Returns the normalised green channel value.final int
hashCode()
final int
r()
Returns the red channel value.final float
r_f()
Returns the normalised red channel value.final @NotNull String
toString()
-
Field Details
-
rgba
public final int rgba -
NONE
-
BLACK
-
WHITE
-
-
Constructor Details
-
Color
Copy constructor.- Parameters:
other
- copied object.
-
Color
public Color(int rgba) Constructor.- Parameters:
rgba
- the color value packed as 32bit.
-
Color
public Color(int r, int g, int b, int a) Constructor.- Parameters:
r
- the red channel value (= 0..255).g
- the green channel value (= 0..255).b
- the blue channel value (= 0..255).a
- the alpha channel value (= 0..255).
-
Color
public Color(int r, int g, int b, float a) Constructor.- Parameters:
r
- the red channel value (= 0..255).g
- the green channel value (= 0..255).b
- the blue channel value (= 0..255).a
- the alpha channel value (= 0..1).
-
-
Method Details
-
r
public final int r()Returns the red channel value.- Returns:
- the red channel value.
-
g
public final int g()Returns the green channel value.- Returns:
- the green channel value.
-
b
public final int b()Returns the blue channel value.- Returns:
- the blue channel value.
-
a
public final int a()Returns the alpha channel value.- Returns:
- the alpha channel value.
-
r_f
public final float r_f()Returns the normalised red channel value.- Returns:
- the ref channel value.
-
g_f
public final float g_f()Returns the normalised green channel value.- Returns:
- the green channel value.
-
b_f
public final float b_f()Returns the normalised blue channel value.- Returns:
- the blue channel value.
-
a_f
public final float a_f()Returns the normalised aslpha channel value.- Returns:
- the alpha channel value.
-
equals
-
hashCode
public final int hashCode() -
toString
-