예제 #1
0
 /*
  *  Copy from another TextureData
  */
 public void CopyPixel(TextureData source, int sourceX, int sourceY, int destX, int destY)
 {
     SetPixel(destX, destY, source.GetPixel(sourceX, sourceY));
 }
예제 #2
0
 public void CopyPixels(TextureData source, Rectangle sourceRect, int destX, int destY)
 {
     for (int i = 0; i < sourceRect.Width; i++)
         for (int j = 0; j < sourceRect.Height; j++)
             CopyPixel(source, sourceRect.X + i, sourceRect.Y + j, destX + i, destY + j);
 }
예제 #3
0
 public void CopyPixelsBlend(TextureData source, Rectangle sourceRect, int destX, int destY, float alpha)
 {
     for (int i = 0; i < sourceRect.Width; i++)
         for (int j = 0; j < sourceRect.Height; j++)
             CopyPixelBlend(source, sourceRect.X + i, sourceRect.Y + j, destX + i, destY + j, alpha);
 }
예제 #4
0
 public void CopyPixelBlend(TextureData source, int sourceX, int sourceY, int destX, int destY, float alpha)
 {
     SetPixelBlend(destX, destY, source.GetPixel(sourceX, sourceY) * alpha);
 }