public function setChild($child, SVGNode $node)
    {
        $index = $this->resolveChildIndex($child);
        if ($index === false) {
            return $this;
        }

        $this->removeChild($index);
        $this->addChild($node, $index);

        return $this;
    }