MCPcopy Index your code
hub / github.com/benfry/processing4 / addChild

Method addChild

core/src/processing/core/PShape.java:2130–2143  ·  view source on GitHub ↗

Adds a child PShape to a parent PShape that is defined as a GROUP. In the example, the three shapes path , rectangle , and circle are added to a parent PShape variable named house that is a GROUP. @webref pshape:method @webBrief Adds a new child @param who any variable of t

(PShape who)

Source from the content-addressed store, hash-verified

2128 * @see PShape#getChild(int)
2129 */
2130 public void addChild(PShape who) {
2131 if (children == null) {
2132 children = new PShape[1];
2133 }
2134 if (childCount == children.length) {
2135 children = (PShape[]) PApplet.expand(children);
2136 }
2137 children[childCount++] = who;
2138 who.parent = this;
2139
2140 if (who.getName() != null) {
2141 addName(who.getName(), who);
2142 }
2143 }
2144
2145
2146 // adds child who exactly at position idx in the array of children.

Callers 4

getTessellationMethod · 0.95
parseChildrenMethod · 0.45
copyGroupMethod · 0.45
addChildrenMethod · 0.45

Calls 3

expandMethod · 0.95
addNameMethod · 0.95
getNameMethod · 0.45

Tested by

no test coverage detected