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);
    }
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);
    }
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 ) ; }
Adds a triangle to the image.

@param float $x The x-coordinate of the bounding rectangle
upper-left corner.
@param float $y The y-coordinate of the bounding rectangle
upper-left corner.
@param float $width The width of the bounding rectangle.
@param float $height The height of the bounding rectangle.
@param float $direction The direction of the 90 degree corner of the
triangle.
@param bool $invert If true the area of the triangle will be removed
from the filled area.
Adds a triangle to the image .