/* * Copy from another TextureData */ public void CopyPixel(TextureData source, int sourceX, int sourceY, int destX, int destY) { SetPixel(destX, destY, source.GetPixel(sourceX, sourceY)); }
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); }
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); }
public void CopyPixelBlend(TextureData source, int sourceX, int sourceY, int destX, int destY, float alpha) { SetPixelBlend(destX, destY, source.GetPixel(sourceX, sourceY) * alpha); }