Skip to content

Instantly share code, notes, and snippets.

@twoism
Created July 15, 2013 22:44
Show Gist options
  • Save twoism/6004167 to your computer and use it in GitHub Desktop.
Save twoism/6004167 to your computer and use it in GitHub Desktop.
if (tl != null && br != null) {
loadPixels();
for (int x = (int)tl.x; x <= br.x; x++) {
pixels[(int)tl.y*width + x] = color(255, 100, 0);
pixels[(int)br.y*width + x] = color(255, 100, 0);
}
for (int y = (int)tl.y; y <= br.y; y++) {
pixels[y*width + (int)tl.x] = color(255, 100, 0);
pixels[y*width + (int)br.x] = color(255, 100, 0);
}
updatePixels();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment