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

Method removeChild

core/src/processing/core/PShape.java:2084–2098  ·  view source on GitHub ↗

Remove the child shape with index idx.

(int idx)

Source from the content-addressed store, hash-verified

2082 * Remove the child shape with index idx.
2083 */
2084 public void removeChild(int idx) {
2085 if (idx < childCount) {
2086 PShape child = children[idx];
2087
2088 // Copy [idx + 1, childCount - 1] to [idx, childCount - 2]
2089 for (int i = idx; i < childCount - 1; i++) {
2090 children[i] = children[i + 1];
2091 }
2092 childCount--;
2093
2094 if (child.getName() != null && nameTable != null) {
2095 nameTable.remove(child.getName());
2096 }
2097 }
2098 }
2099
2100
2101 /**

Callers

nothing calls this directly

Calls 2

getNameMethod · 0.95
removeMethod · 0.45

Tested by

no test coverage detected