Hi, I'm using a Windows 7 machine and Processing 2.0b8 and I'm simply trying to draw a PShape that will translate across the screen but the line is not showing up. Anybody see the problem?
private PShape shape;
private boolean left = false;
private int count = 0;
public void setup() {
size(1280, 720, P2D);
this.shape = createShape();
this.shape.beginShape();
this.shape.vertex(width / 2, 0);
this.shape.vertex(width / 2, height);
this.shape.endShape();
this.shape.setStroke(0);
this.shape.setStrokeWeight(10);
}
public void draw() {
background(255);
if (left)
this.shape.translate(1, 0);
else
this.shape.translate(-1, 0);
count++;
if (count == width) {
this.left = !this.left;
this.count = 0;
}
shape(this.shape);
System.out.println(this.shape.getVertexX(0));
}