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="center">The center coordinate of the the arc.</param>
/// <param name="radius">The radius of the arc.</param>
/// <param name="startAngle">The starting angle of the arc in radians, where 0 is 3 O'Clock.</param>
/// <param name="arcAngle">The sweep of the arc in radians.  Positive values draw clockwise.</param>
/// <param name="subdivisions">The number of subdivisions in a circle of the same 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 center, float radius, float startAngle, float arcAngle, 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(center, radius, startAngle, arcAngle, subdivisions);
            if (_pathBuilder.Count > 1) {
                AddPath(_pathBuilder.Buffer, 0, _pathBuilder.Count, pen, _ws);
                if (_sortMode == DrawSortMode.Immediate)
                    FlushBuffer();
            }
        }
public void DrawArc ( Pen pen , Vector2 center , float radius , float startAngle , float arcAngle , int subdivisions ) { if ( ! _inDraw ) throw new InvalidOperationException ( ) ; if ( pen == null ) throw new ArgumentNullException ( " " ) ; _ws . ResetWorkspace ( pen ) ; _pathBuilder . Reset ( ) ; _pathBuilder . CalculateLengths = pen . NeedsPathLength ; _pathBuilder . AddArc ( center , radius , startAngle , arcAngle , 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 .
center
Vector2
The center coordinate of the the arc.
The center coordinate of the the arc .
radius
float
The radius of the arc.
The radius of the arc .
startAngle
float
The starting angle of the arc in radians, where 0 is 3 O'Clock.
The starting angle of the arc in radians where 0 is 3 O ' Clock .
arcAngle
float
The sweep of the arc in radians.  Positive values draw clockwise.
The sweep of the arc in radians . Positive values draw clockwise .
subdivisions
int
The number of subdivisions in a circle of the same radius.
The number of subdivisions in a circle of the same 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 )