Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
you can remove a point now
  • Loading branch information
cor11004 committed Dec 7, 2015
1 parent a23825c commit e2066fb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main/main.pde
Expand Up @@ -89,7 +89,8 @@ public void setup() {
(new Face(h12, list)).printFace();
}
void draw() {
drawgraph.drawGraph(list.getPoints());
background(255,255,255,0);
drawgraph.drawGraph(list.getPoints());
}
void keyPressed() {
switch (key) {
Expand Down Expand Up @@ -156,11 +157,13 @@ public void insertMode(float x, float y) {
}

public void removePointMode(float x, float y) {
boolean removePoint= false;
System.out.println("entered remove point");
boolean removePoint = false;
Point removeThis = null;
for(Point p: list.getPoints()) {
if((p.getX() - 10 < x) && (p.getX() + + 10 > x)) {
if((p.getX() - 10 < x) && (p.getX() + 10 > x)) {
if((p.getY() - 10 < y) && (p.getY() + 10 > y)) {
System.out.println("point found");
removeThis = p;
removePoint = true;
}
Expand Down

0 comments on commit e2066fb

Please sign in to comment.