# The midterm (final)

This work has been developed more from the last week. The concept of this project is now collaborated with an idea of ‘memo’ next to the world map. While different flags appear, one can memo on the illustration board.

Changes:

-Size of the map

-Illustration board

Problems:

-Image for background of the illustration board does not load

-Code for text to disappear when an image of flag loads

Code

PImage img;
PImage bg;
int x;
int y;
color pix;
float pointillize = 2;
int value = 0;
void setup() {
size(1300, 620);
//image(img, 0, 0);
imageMode(CORNER);
image(img,0,0, 960,620);
noStroke();}
{

imageMode(CORNER);
image(img,340,620,960,620);
}

}

void draw() {

{stroke(0);
strokeWeight(2);

if (mousePressed == true) {
line(mouseX, mouseY, pmouseX, pmouseY);
}
}

//asia
image(img,0,0, 960,620); // We don’t need this anymore becayse we are drawing our own pixels
{{ if (mousePressed && (mouseButton == LEFT)) {
if (mouseX >= 600 && mouseX <= 920) {
if (mouseY >= 0 && mouseY <=310) {
} else {
value = 0 ;
}
}
}
}

//europe
image(img,0,0, 960,620); // We don’t need this anymore becayse we are drawing our own pixels
{if (mousePressed && (mouseButton == LEFT)) {
if (mouseX >= 400 && mouseX <= 600) {
if (mouseY >= 0 && mouseY <=200) {
} else {
value = 0 ;
}
}
}
}
//america
image(img,0,0, 960,620); // We don’t need this anymore becayse we are drawing our own pixels
{if (mousePressed && (mouseButton == LEFT)) {
if (mouseX >= 0 && mouseX <= 300) {
if (mouseY >= 0 && mouseY <=240) {
} else {
value = 0 ;
}
}
}
}
//south america
image(img,0,0, 960,620); // We don’t need this anymore becayse we are drawing our own pixels
{if (mousePressed && (mouseButton == LEFT)) {
if (mouseX >=100 && mouseX <=340) {
if ( mouseY >=350 && mouseY <= 960) {
} else {
value = 0 ;
}
}
}
}

//africa
image(img,0,0, 960,620);// We don’t need this anymore becayse we are drawing our own pixels
if (mousePressed && (mouseButton == LEFT)) {
if (mouseX >= 400 && mouseX <= 600) {
if (mouseY >= 240 && mouseY <=900) {
} else {
value = 0 ;
}

}

//austrailia
image(img,0,0, 960,620);// We don’t need this anymore becayse we are drawing our own pixels
if (mousePressed && (mouseButton == LEFT)) {
if (mouseX >= 760 && mouseX <= 910) {
if (mouseY >= 400 && mouseY <=960) {
} else {
value = 0 ;
}

}
}
}
///////////////////text///////////////////

//asia

if (mouseX >= 600 && mouseX <= 920) {
if (mouseY >= 0 && mouseY <=310) {
fill(0);
textSize(15);
text(“asia”, mouseX, mouseY);
}
}

//europe
if (mouseX >= 400 && mouseX <= 600) {
if (mouseY >= 0 && mouseY <=200) {
fill(0);
textSize(15);
text(“europe”, mouseX, mouseY);
}
}
//africa
if (mouseX >= 400 && mouseX <= 600) {
if (mouseY >= 240 && mouseY <=900) {
fill(0);
textSize(15);
text(“africa”, mouseX, mouseY);
}
}

//austrailia
if (mouseX >= 760 && mouseX <= 910) {
if (mouseY >= 400 && mouseY <=960) {
fill(0);
textSize(15);
text(“austrailia”, mouseX, mouseY);
}
}

//america
if (mouseX >= 0 && mouseX <= 300) {
if (mouseY >= 0 && mouseY <=240) {
fill(0);
textSize(15);
text(“america”, mouseX, mouseY);
}
}

//south america
if (mouseX >=100 && mouseX <=340) {
if ( mouseY >=350 && mouseY <= 960) {
fill(0);
textSize(15);
text(“south america”, mouseX, mouseY);
}
}
}
}

This entry was posted in Uncategorized on .