Skip to content

Instantly share code, notes, and snippets.

@sgallese
Created October 18, 2009 22:15
Show Gist options
  • Save sgallese/212882 to your computer and use it in GitHub Desktop.
Save sgallese/212882 to your computer and use it in GitHub Desktop.
PImage b;
void setup(){
size(448, 448);
// Images must be in the "data" directory to load correctly
b = loadImage("square.gif");
image(b, 0, 0);
}
void draw(){
}
void mouseClicked() {
float mX = mouseX;
float mY = mouseY;
System.out.println((((mX/width)*8.0)-4.0)+" , "+(((mY/height)*8.0)-4.0));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment