ir, can i ask u a question? I wrote this code in processing, where you have something like gallery with some images. And if you click on one picture its enlarges. But right now, where ever I click, it is same picture which enlarge and fit the “screen” help?
This is my original code
boolean makeLarge;
PImage bat;
PImage Mask;
PImage jpg_bat;
PImage jpg_mask;
void setup()
{
size(400, 600);
smooth();
fill(255,255,255);
textFont(createFont("sansSerif",32));
textAlign(CENTER);
bat = loadImage("imvbbbage.jpg");
Mask = loadImage("iVEEmage.jpg");
jpg_bat = loadImage("Serena+Williams.jpg");
jpg_mask = loadImage("image.jpg");
}
void draw() {
background(0);
text("Click On An Image!", width/2, height/2);
image(bat, 10,419, 70, 70);
image(jpg_bat, 380,380, 140, 140);
image(jpg_mask,415,10, 70,70);
if (makeLarge)
{
image(Mask, 10, 10, 210, 210);
}
else
{
image(Mask, 10, 10, 70, 70);
}
}
void mousePressed()
{
makeLarge = true;
}
void mouseReleased()
{
makeLarge = false;
}