Add curve

@api
@param GraphCurve $curve Curve
@return static
495228
public function addCurve(GraphCurve $curve)
    {
        $curve->setGraph($this);
        $this->addScriptFeature($curve);
        array_push($this->curves, $curve);
        return $this;
    }
487725
public function add($interval)
    {
        parent::add($interval);

        if ($interval instanceof DateInterval) {
            if ($interval->invert) { // is negative, then sub
                $this->subMicroseconds($interval->u);
            } else {
                $this->addMicroseconds($interval->u);
            }
        }

        return $this;
    }
1246061
public function addRectangle($x1, $y1, $x2, $y2, $colors = [0, 0, 0])
    {
        $color = imagecolorallocate($this->image(), $colors[0],  $colors[1],  $colors[2]);
        imagerectangle ( $this->image() , $x1 , $y1 , $x2 , $y2 ,  $color );
    }
1215898
private function readCurvePolygon(WKBBuffer $buffer, CoordinateSystem $cs) : CurvePolygon
    {
        $numRings = $buffer->readUnsignedLong();

        $rings = [];

        for ($i = 0; $i < $numRings; $i++) {
            $rings[] = $this->readGeometry($buffer, $cs->SRID());
        }

        return new CurvePolygon($cs, ...$rings);
    }
78983
public function add(Edge $edge) 
    {
        $dwinding = $edge->y0 < $edge->y1 ? 1 : -1;
        
        $layer = $this->topLayer;
        $previousLayer = null;
        
        while ($layer !== null) {
            if ($layer->polygonId === $edge->polygonId) {
                $layer->winding += $dwinding;

                $inPath = $layer->windingRule == 'evenodd' ? 
                    ($layer->winding % 2 === 1) : ($layer->winding !== 0);

                if (!$inPath) {
                    // Remove layer
                    if ($previousLayer === null) {
                        $this->topLayer = $layer->nextLayer;
                    }
                    else {
                        $previousLayer->nextLayer = $layer->nextLayer;
                    }
                }
                break;
            } elseif ($layer->polygonId < $edge->polygonId) {
                // Insert here
                $newLayer = new Layer(
                    $edge->polygonId,
                    $edge->color,
                    $dwinding,
                    $edge->windingRule
                );
                $newLayer->nextLayer = $layer;
                
                if ($previousLayer === null) {
                    $this->topLayer = $newLayer;
                } else {
                    $previousLayer->nextLayer = $newLayer;
                }
                break;
            }
            
            $previousLayer = $layer;
            $layer = $layer->nextLayer;
        }
        
        if ($layer === null) {
            $newLayer = new Layer(
                $edge->polygonId,
                $edge->color,
                $dwinding,
                $edge->windingRule
            );
            
            if ($previousLayer === null) {
                $this->topLayer = $newLayer;
            } else {
                $previousLayer->nextLayer = $newLayer;
            }
        }

        // Update current color
        $color = ColorUtils::TRANSPARENT;
        $layer = $this->topLayer;
        
        while ($layer !== null && ($color & 0xff) < 255) {
            if ($layer->color === ColorUtils::FORCE_TRANSPARENT) {
                break;
            }
            
            $color = ColorUtils::over($layer->color, $color);
        }
        
        $this->color = $color;
    }
1267529
public static function ensureOnCurve($key)
    {
        $point = self::unserializePoint($key);
        if (!static::curve()->contains($point->getX(), $point->getY())) {
            throw new \InvalidArgumentException(
                'Invalid key. Point is not on the curve.'
            );
        }
    }
558786
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "curveProperty")
    public JAXBElement<CurvePropertyType> createCurveProperty(CurvePropertyType value) {
        return new JAXBElement<CurvePropertyType>(_CurveProperty_QNAME, CurvePropertyType.class, null, value);
    }
758158
public function addCoord(LatLng $coord)
    {
        $cloned = clone $coord;
        $cloned->name = null;
        $this->options['paths'][] = $coord;

        return $this;
    }
462104
public static PathPoint curveTo(float c0X, float c0Y, float c1X, float c1Y, float x, float y) {
        return new PathPoint(c0X,  c0Y, c1X, c1Y, x, y);
    }
719613
public function add($ch)
    {
        $deferred = new Deferred;
        $errno = curl_multi_add_handle($this->mh, $ch);
        if ($errno !== CURLM_OK) {
            // @codeCoverageIgnoreStart
            $msg = curl_multi_strerror($errno) . ": $ch";
            $deferred->reject(new \RuntimeException($msg));
            return $deferred->promise();
            // @codeCoverageIgnoreEnd
        }
        $this->added[(string)$ch] = $ch;
        $this->deferreds[(string)$ch] = $deferred;
        return $deferred->promise();
    }
1053316
public Graph<K, VV, EV> addVertex(final Vertex<K, VV> vertex) {
		List<Vertex<K, VV>> newVertex = new ArrayList<>();
		newVertex.add(vertex);

		return addVertices(newVertex);
	}
1287571
public static function add($x, $y)
    {
        $X = static::parse($x);
        $Y = static::parse($y);

        $resp = $X->p * $Y->q + $X->q * $Y->p;
        $resq = $X->q * $Y->q;

        return new Rational($resp, $resq);
    }
652417
public static function createECKey(string $curve, array $values = []): JWK
    {
        try {
            $jwk = self::createECKeyUsingOpenSSL($curve);
        } catch (Throwable $e) {
            $jwk = self::createECKeyUsingPurePhp($curve);
        }
        $values = array_merge($values, $jwk);

        return new JWK($values);
    }
344202
public static function add( $key, $path, $url = null )
	{
		static::$paths[$key] = $path;
		
		if ( !is_null( $url ) )
		{
			static::$urls[$key] = $url;
		}
	}
159889
function curve( $x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3 )
    {
        // in the current line style, draw a bezier curve from (x0,y0) to (x3,y3) using the other two points
        // as the control points for the curve.
        $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3F',$x0).' '.sprintf('%.3F',$y0).' m '.sprintf('%.3F',$x1).' '.sprintf('%.3F',$y1);
        $this->objects[$this->currentContents]['c'].= ' '.sprintf('%.3F',$x2).' '.sprintf('%.3F',$y2).' '.sprintf('%.3F',$x3).' '.sprintf('%.3F',$y3).' c S';
    }
546209
def add(object)
      key, id = to_key_and_id(object)

      @graph[key] ? @graph[key] << id : @graph[key] = [id]
    end
485322
public void setCurve(Curve curveRed, Curve curveGreen, Curve curveBlue) {
        this.curveRed = curveRed;
        this.curveGreen = curveGreen;
        this.curveBlue = curveBlue;
    }