Created
March 12, 2012 18:20
-
-
Save blam23/2023764 to your computer and use it in GitHub Desktop.
Get portion of image stored in 1d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(int y = portion.y; y < portion.height+portion.y; y++) | |
{ | |
for(int x = portion.x; x < portion.width+portion.x; x++) | |
{ | |
int pixelPos = (x*image.width) + y; | |
image.pixelData[pixelPos] = Color.Black; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment