PShape.setStroke() uses color(255) in GroupPShape example

This commit is contained in:
codeanticode
2013-02-17 14:36:19 -05:00
parent e6989c6be0
commit fea7ded272

View File

@@ -45,17 +45,15 @@ void setup() {
// Make a primitive (Rectangle) PShape
PShape rectangle = createShape(RECT,-10,-10,20,20);
rectangle.setFill(false);
rectangle.setStroke(255);
rectangle.setStroke(color(255));
// Add them all to the group
group.addChild(star);
group.addChild(path);
group.addChild(rectangle); // Rectangle is missing???
group.addChild(rectangle);
}
void draw() {
// We can access them individually via the group PShape
PShape rectangle = group.getChild(2);
// Shapes can be rotated