mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-15 14:51:21 +00:00
34 lines
770 B
C#
34 lines
770 B
C#
|
namespace TargaImagePCL
|
|||
|
{
|
|||
|
public struct Color
|
|||
|
{
|
|||
|
public static Color Empty = Color.FromArgb(0, 0, 0, 0);
|
|||
|
|
|||
|
public byte R;
|
|||
|
public byte G;
|
|||
|
public byte B;
|
|||
|
public byte A;
|
|||
|
public static Color FromArgb(int a, int r, int g, int b)
|
|||
|
{
|
|||
|
return new Color()
|
|||
|
{
|
|||
|
R = (byte)r,
|
|||
|
G = (byte)g,
|
|||
|
B = (byte)b,
|
|||
|
A = (byte)a
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
public static Color FromArgb(int r, int g, int b)
|
|||
|
{
|
|||
|
return new Color()
|
|||
|
{
|
|||
|
R = (byte)r,
|
|||
|
G = (byte)g,
|
|||
|
B = (byte)b,
|
|||
|
A = (byte)255
|
|||
|
};
|
|||
|
}
|
|||
|
}
|
|||
|
}
|