MCPcopy Index your code
hub / github.com/processing/processing / createShape

Method createShape

core/src/processing/core/PShape.java:1446–1463  ·  view source on GitHub ↗
(PApplet parent, PShape src)

Source from the content-addressed store, hash-verified

1444
1445 // TODO unapproved
1446 static protected PShape createShape(PApplet parent, PShape src) {
1447 PShape dest = null;
1448 if (src.family == GROUP) {
1449 dest = parent.createShape(GROUP);
1450 PShape.copyGroup(parent, src, dest);
1451 } else if (src.family == PRIMITIVE) {
1452 dest = parent.createShape(src.kind, src.params);
1453 PShape.copyPrimitive(src, dest);
1454 } else if (src.family == GEOMETRY) {
1455 dest = parent.createShape(src.kind);
1456 PShape.copyGeometry(src, dest);
1457 } else if (src.family == PATH) {
1458 dest = parent.createShape(PATH);
1459 PShape.copyPath(src, dest);
1460 }
1461 dest.setName(src.name);
1462 return dest;
1463 }
1464
1465
1466 // TODO unapproved

Callers 1

copyGroupMethod · 0.95

Calls 5

copyGroupMethod · 0.95
copyPrimitiveMethod · 0.95
copyGeometryMethod · 0.95
copyPathMethod · 0.95
setNameMethod · 0.95

Tested by

no test coverage detected