LilyPath/DrawBatch.cs
/// <summary>
/// Computes and adds an arc path to the batch of figures to be rendered using up to the given number of subdivisions.
/// </summary>
/// <param name="pen">The pen to render the path with.</param>
/// <param name="p0">The starting point of the arc.</param>
/// <param name="p1">The ending point of the arc.</param>
/// <param name="height">The furthest point on the arc from the line connecting <paramref name="p0"/> and <paramref name="p1"/>.</param>
/// <param name="subdivisions">The number of subdivisions in a circle of the same arc radius.</param>
/// <exception cref="InvalidOperationException"><c>DrawArc</c> was called, but <see cref="Begin()"/> has not yet been called.</exception>
/// <remarks>The number of subdivisions in the arc is computed as <c>(subdivisions) * (arcAngle / 2PI)</c>.</remarks>
Computes and adds an arc path to the batch of figures to be rendered using up to the given number of subdivisions.
Computes and adds an arc path to the batch of figures to be rendered using up to the given number of subdivisions .
public void DrawArc (Pen pen, Vector2 p0, Vector2 p1, float height, int subdivisions)
        {
            if (!_inDraw)
                throw new InvalidOperationException();
            if (pen == null)
                throw new ArgumentNullException("pen");
            _ws.ResetWorkspace(pen);
            _pathBuilder.Reset();
            _pathBuilder.CalculateLengths = pen.NeedsPathLength;
            _pathBuilder.AddArc(p0, p1, height, subdivisions);
            if (_pathBuilder.Count > 1) {
                AddPath(_pathBuilder.Buffer, 0, _pathBuilder.Count, pen, _ws);
                if (_sortMode == DrawSortMode.Immediate)
                    FlushBuffer();
            }
        }
public void DrawArc ( Pen pen , Vector2 p0 , Vector2 p1 , float height , int subdivisions ) { if ( ! _inDraw ) throw new InvalidOperationException ( ) ; if ( pen == null ) throw new ArgumentNullException ( " " ) ; _ws . ResetWorkspace ( pen ) ; _pathBuilder . Reset ( ) ; _pathBuilder . CalculateLengths = pen . NeedsPathLength ; _pathBuilder . AddArc ( p0 , p1 , height , subdivisions ) ; if ( _pathBuilder . Count > 1 ) { AddPath ( _pathBuilder . Buffer , 0 , _pathBuilder . Count , pen , _ws ) ; if ( _sortMode == DrawSortMode . Immediate ) FlushBuffer ( ) ; } }
Computes and adds an arc path to the batch of figures to be rendered using up to the given number of subdivisions.
Computes and adds an arc path to the batch of figures to be rendered using up to the given number of subdivisions .
DrawArc has not yet been called.
DrawArc has not yet been called .
pen
Pen
The pen to render the path with.
The pen to render the path with .
p0
Vector2
The starting point of the arc.
The starting point of the arc .
p1
Vector2
The ending point of the arc.
The ending point of the arc .
height
float
The furthest point on the arc from the line connecting  and .
The furthest point on the arc from the line connecting and .
subdivisions
int
The number of subdivisions in a circle of the same arc radius.
The number of subdivisions in a circle of the same arc radius .
remarks
The number of subdivisions in the arc is computed as (subdivisions) * (arcAngle / 2PI)
The number of subdivisions in the arc is computed as ( subdivisions ) * ( arcAngle / 2PI )