public function svg()
    {
        if (is_null($this->center) || is_null($this->radius)) {
            throw new \RuntimeException('Before exporting to SVG, you must give center and radius!');
        }

        if ($this->isCircle()) {
            return sprintf(
                '<circle cx="%d" cy="%d" r="%d" fill="%s" />',
                $this->center->x,
                $this->center->y,
                $this->radius->r,
                $this->color
            );
        }

        return sprintf(
            '<ellipse cx="%d" cy="%d" rx="%d" ry="%d" fill="%s" />',
            $this->center->x,
            $this->center->y,
            $this->radius->rx,
            $this->radius->ry,
            $this->color
        );
    }