public GetPixelColor ( int x, int y ) : Color | ||
x | int | |
y | int | |
return | Color |
public void Blit(ImageData source, Rectangle sourceRectangle, Point destination) { for (int y = 0; y < sourceRectangle.Height; y++) { for (int x = 0; x < sourceRectangle.Width; x++) { int sourceX = x + sourceRectangle.X; int sourceY = y + sourceRectangle.Y; int destinationX = x + destination.X; int destinationY = y + destination.Y; if (destinationX > -1 && destinationY > -1 && destinationX < this.Width && destinationY < this.Height) { //this.SetPixel(destinationX, destinationY, source.GetPixelColor(sourceX, sourceY)); this.AddPixelRegular(destinationX, destinationY, source.GetPixelColor(sourceX, sourceY)); } } } }
public void Blit(ImageData source, Rectangle sourceRectangle, Point destination) { for (int y = 0; y < sourceRectangle.Height; y++) { for (int x = 0; x < sourceRectangle.Width; x++) { int sourceX = x + sourceRectangle.X; int sourceY = y + sourceRectangle.Y; int destinationX = x + destination.X; int destinationY = y + destination.Y; if (destinationX > -1 && destinationY > -1 && destinationX < this.Width && destinationY < this.Height) { //this.SetPixel(destinationX, destinationY, source.GetPixelColor(sourceX, sourceY)); this.AddPixelRegular(destinationX, destinationY, source.GetPixelColor(sourceX, sourceY)); } } } }