LilyPath/DrawBatch.cs
/// <summary>
/// Computes and adds a cubic Bezier path to the batch of figures to be rendered.
/// </summary>
/// <param name="pen">The pen 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 second control point.</param>
/// <param name="p3">The end point of the curve.</param>
/// <exception cref="InvalidOperationException"><c>DrawBezier</c> was called, but <see cref="Begin()"/> has not yet been called.</exception>
Computes and adds a cubic Bezier path to the batch of figures to be rendered.
Computes and adds a cubic Bezier path to the batch of figures to be rendered .
public void DrawBezier (Pen pen, Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3)
        {
            if (!_inDraw)
                throw new InvalidOperationException();
            if (pen == null)
                throw new ArgumentNullException("pen");
            _ws.ResetWorkspace(pen);
            _pathBuilder.Reset();
            _pathBuilder.CalculateLengths = pen.NeedsPathLength;
            _pathBuilder.AddBezier(p0, p1, p2, p3);
            AddPath(_pathBuilder.Buffer, 0, _pathBuilder.Count, pen, _ws);
            if (_sortMode == DrawSortMode.Immediate)
                FlushBuffer();
        }
public void DrawBezier ( Pen pen , Vector2 p0 , Vector2 p1 , Vector2 p2 , Vector2 p3 ) { if ( ! _inDraw ) throw new InvalidOperationException ( ) ; if ( pen == null ) throw new ArgumentNullException ( " " ) ; _ws . ResetWorkspace ( pen ) ; _pathBuilder . Reset ( ) ; _pathBuilder . CalculateLengths = pen . NeedsPathLength ; _pathBuilder . AddBezier ( p0 , p1 , p2 , p3 ) ; AddPath ( _pathBuilder . Buffer , 0 , _pathBuilder . Count , pen , _ws ) ; if ( _sortMode == DrawSortMode . Immediate ) FlushBuffer ( ) ; }
Computes and adds a cubic Bezier path to the batch of figures to be rendered.
Computes and adds a cubic Bezier path to the batch of figures to be rendered .
DrawBezier has not yet been called.
DrawBezier has not yet been called .
pen
Pen
The pen to render the path with.
The pen 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 second control point.
The second control point .
p3
Vector2
The end point of the curve.
The end point of the curve .