public function addTriangle($x, $y, $width, $height, $direction, $invert = false)
    {
        $points = array(
            new Point($x + $width, $y),
            new Point($x + $width, $y + $height),
            new Point($x, $y + $height),
            new Point($x, $y)
        );

        array_splice($points, $direction, 1);
        
        $this->addPolygonCore($points, $invert);
    }