Point PShapes not visible
in
Programming Questions
•
3 months ago
I'm trying to create and draw a PShape which contains one (or more) point.
when I try to render it "shape(pointShape, x, y);" with P2D renderer nothing is visible. (in Processing 2.0 and 2.1)
I tried to change the stroke and strokeWeight, but nothing gets drawn.
Does someone know, what I'm doing wrong. (Other Shapes are no Problem).
// first try:
- PShape pointShape;
- pointShape = createShape(POINT, 0, 0);
- pointShape.setStroke(255);
- pointShape.setStrokeWeight(5);
- pointShape.setFill(255);
- background(0);
- shape(pointShape, width/2, height/2);
// second try:
- PShape pointShape;
- pointShape = createShape();
- pointShape.beginShape(POINTS);
- pointShape.stroke(255);
- pointShape.strokeWeight(3);
- pointShape.vertex(0, 0);
- pointShape.endShape();
- background(0);
- shape(pointShape, width/2, height/2);
1