mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-25 22:54:23 +00:00
Initial Commit
This commit is contained in:
1 parent
397135f687
commit
0f32dd8620
82 files changed
+10693
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package codechicken.lib.colour;
|
||||
|
||||
public class ColourARGB extends Colour
|
||||
{
|
||||
public ColourARGB(int colour)
|
||||
{
|
||||
super((colour >> 16) & 0xFF, (colour >> 8) & 0xFF, colour & 0xFF, (colour >> 24) & 0xFF);
|
||||
}
|
||||
|
||||
public ColourARGB(int a, int r, int g, int b)
|
||||
{
|
||||
super(r, g, b, a);
|
||||
}
|
||||
|
||||
public ColourARGB(ColourARGB colour)
|
||||
{
|
||||
super(colour);
|
||||
}
|
||||
|
||||
public ColourARGB copy()
|
||||
{
|
||||
return new ColourARGB(this);
|
||||
}
|
||||
|
||||
public int pack()
|
||||
{
|
||||
return pack(this);
|
||||
}
|
||||
|
||||
public static int pack(Colour colour)
|
||||
{
|
||||
return (colour.a&0xFF) << 24 | (colour.r&0xFF) << 16 | (colour.g&0xFF) << 8 | (colour.b&0xFF);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user