Exemplo n.º 1
0
 public void addWeighted(double weight, PixelStruct pix)
 {
     r += (int)(weight * pix.r);
     g += (int)(weight * pix.g);
     b += (int)(weight * pix.b);
     a += (int)(weight * pix.a);
 }
Exemplo n.º 2
0
 public static PixelStruct PixelMax(PixelStruct pa, PixelStruct pb)
 {
     return(new PixelStruct
     {
         r = Math.Max(pa.r, pb.r),
         g = Math.Max(pa.g, pb.g),
         b = Math.Max(pa.b, pb.b),
         a = Math.Max(pa.a, pb.a)
     });
 }
Exemplo n.º 3
0
		public static PixelStruct PixelMax(PixelStruct pa, PixelStruct pb)
		{
			return new PixelStruct
			{
				r = Math.Max(pa.r, pb.r),
				g = Math.Max(pa.g, pb.g),
				b = Math.Max(pa.b, pb.b),
				a = Math.Max(pa.a, pb.a)
			};
		}