Exemplo n.º 1
0
 public void SetValues(int newR, int newG, int newB)
 {
     byteR = CGMath.Clamp(newR, 0, 255);
     byteG = CGMath.Clamp(newG, 0, 255);
     byteB = CGMath.Clamp(newB, 0, 255);
 }
Exemplo n.º 2
0
 public void SetValues(float newR, float newG, float newB)
 {
     byteR = (int)CGMath.Clamp(newR, 0f, 1f) * 255;
     byteG = (int)CGMath.Clamp(newG, 0f, 1f) * 255;
     byteB = (int)CGMath.Clamp(newB, 0f, 1f) * 255;
 }
Exemplo n.º 3
0
 public void SetValue(float newValue)
 {
     ByteValue = (byte)(CGMath.Clamp(newValue, 0f, 1f) * 255);
 }
Exemplo n.º 4
0
 public void SetValue(int newValue)
 {
     ByteValue = (byte)CGMath.Clamp(newValue, 0, 255);
 }
Exemplo n.º 5
0
 public Grayscale(float newValue)
 {
     ByteValue = (byte)(CGMath.Clamp(newValue, 0f, 1f) * 255);
 }
Exemplo n.º 6
0
//    public Grayscale()
//    {
//        byteValue = 0;
//    }

    public Grayscale(int newValue)
    {
        ByteValue = (byte)CGMath.Clamp(newValue, 0, 255);
    }
Exemplo n.º 7
0
 public byte GetOneByteColor()
 {
     return((byte)CGMath.Clamp((byteR + byteG + byteB) / 3, 0, 255));
 }