Beispiel #1
0
 public static uint ToUInt(Pixel p)
 {
     return((uint)((p.alpha << 24) | (p.red << 16) | (p.green << 8) | (p.blue << 0)));
 }
Beispiel #2
0
 public void DrawTriangle(int x1, int y1, int x2, int y2, int x3, int y3, Pixel color)
 {
     DrawLine(x1, y1, x2, y2, color);
     DrawLine(x2, y2, x3, y3, color);
     DrawLine(x1, y1, x3, y3, color);
 }
Beispiel #3
0
 /// <summary>
 ///     Compares this pixel's color to another
 /// </summary>
 /// <param name="other">The other pixel</param>
 /// <returns>If both colors are the same</returns>
 public bool Compare(Pixel other)
 {
     return(other.red == red && other.green == green &&
            other.blue == blue && other.alpha == alpha);
 }