We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 
help image (Read 2107 times)
Re: help image
Reply #15 - Nov 20th, 2009, 12:50pm
 
I do not understand very well....I just a line of code where there is written: ArrayList lines = new ArrayList();
and if I delete PVector node; do not change the question....
Have I misunderstood? Undecided
Re: help image
Reply #16 - Nov 20th, 2009, 1:35pm
 
Code:
 if(mousePressed) {
if (mouseX < dx && mouseY < dy) {
currentImage = images[0];
lines = new ArrayList();
} else if (mouseX >= dx && mouseX < 2*dx && mouseY < dy) {
currentImage = images[1];
lines = new ArrayList();
} else {
PVector node = new PVector(mouseX, mouseY);
lines.add(node);
}
}
Re: help image
Reply #17 - Nov 20th, 2009, 1:46pm
 
Ah I have done the same thing but I repeat only in the first part (I' m not very expert  Tongue) I think that once was enough:

if(mousePressed) {
  if (mouseX >= 477-3*dx && mouseX < 477-2*dx && mouseY < dy) {
    currentImage = images[0];
    lines = new ArrayList();
  } else if (mouseX >= 477-2*dx && mouseX < 477-dx && mouseY < dy) {
    currentImage = images[1];
  } else if (mouseX >= 477-dx && mouseX < 477+dx && mouseY < dy) {
    currentImage = images[2];
  } else if (mouseX >= 20 && mouseX < 211 && mouseY < dy) {
    currentImage = images[4];
  } else {
    PVector node = new PVector(mouseX, mouseY);
    lines.add(node);
  }
}

Thank you very much for your patience. You are very nice...
thanks, thanks, thanks, thanks....infinitely Smiley
Pages: 1 2