LilyPath/DrawBatch.cs
/// <summary>
/// Adds a primitive quadratic Bezier path to the batch of figures to be rendered.
/// </summary>
/// <param name="pen">The pen supplying the color to render the path with.</param>
/// <param name="p0">The start point of the curve.</param>
/// <param name="p1">The first control point.</param>
/// <param name="p2">The end point of the curve.</param>
/// <exception cref="InvalidOperationException"><c>DrawPrimitiveBezier</c> was called, but <see cref="Begin()"/> has not yet been called.</exception>
Adds a primitive quadratic Bezier path to the batch of figures to be rendered.
Adds a primitive quadratic Bezier path to the batch of figures to be rendered .
public void DrawPrimitiveBezier (Pen pen, Vector2 p0, Vector2 p1, Vector2 p2)
        {
            if (!_inDraw)
                throw new InvalidOperationException();
            if (pen == null)
                throw new ArgumentNullException("pen");
            _pathBuilder.Reset();
            _pathBuilder.CalculateLengths = pen.NeedsPathLength;
            _pathBuilder.AddBezier(p0, p1, p2);
            DrawPrimitivePath(pen, _pathBuilder.Buffer, 0, _pathBuilder.Count);
            if (_sortMode == DrawSortMode.Immediate)
                FlushBuffer();
        }
public void DrawPrimitiveBezier ( Pen pen , Vector2 p0 , Vector2 p1 , Vector2 p2 ) { if ( ! _inDraw ) throw new InvalidOperationException ( ) ; if ( pen == null ) throw new ArgumentNullException ( " " ) ; _pathBuilder . Reset ( ) ; _pathBuilder . CalculateLengths = pen . NeedsPathLength ; _pathBuilder . AddBezier ( p0 , p1 , p2 ) ; DrawPrimitivePath ( pen , _pathBuilder . Buffer , 0 , _pathBuilder . Count ) ; if ( _sortMode == DrawSortMode . Immediate ) FlushBuffer ( ) ; }
Adds a primitive quadratic Bezier path to the batch of figures to be rendered.
Adds a primitive quadratic Bezier path to the batch of figures to be rendered .
DrawPrimitiveBezier has not yet been called.
DrawPrimitiveBezier has not yet been called .
pen
Pen
The pen supplying the color to render the path with.
The pen supplying the color to render the path with .
p0
Vector2
The start point of the curve.
The start point of the curve .
p1
Vector2
The first control point.
The first control point .
p2
Vector2
The end point of the curve.
The end point of the curve .