LilyPath/DrawBatch.cs
/// <summary>
/// Adds a primitive arc path to the batch of figures to be rendered using up to the given number of subdivisions.
/// </summary>
/// <param name="pen">The pen supplying the color 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>DrawPrimitiveArc</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>(radius / 1.5) * (arcAngle / 2PI)</c>.</remarks>
Adds a primitive arc path to the batch of figures to be rendered using up to the given number of subdivisions.
Adds a primitive arc path to the batch of figures to be rendered using up to the given number of subdivisions .
public void DrawPrimitiveArc (Pen pen, Vector2 center, float radius, float startAngle, float arcAngle, int subdivisions)
        {
            if (!_inDraw)
                throw new InvalidOperationException();
            if (pen == null)
                throw new ArgumentNullException("pen");
            _pathBuilder.Reset();
            _pathBuilder.CalculateLengths = pen.NeedsPathLength;
            _pathBuilder.AddArc(center, radius, startAngle, arcAngle, subdivisions);
            if (_pathBuilder.Count > 1)
                DrawPrimitivePath(pen, _pathBuilder.Buffer, 0, _pathBuilder.Count, PathType.Open);
        }
public void DrawPrimitiveArc ( Pen pen , Vector2 center , float radius , float startAngle , float arcAngle , int subdivisions ) { if ( ! _inDraw ) throw new InvalidOperationException ( ) ; if ( pen == null ) throw new ArgumentNullException ( " " ) ; _pathBuilder . Reset ( ) ; _pathBuilder . CalculateLengths = pen . NeedsPathLength ; _pathBuilder . AddArc ( center , radius , startAngle , arcAngle , subdivisions ) ; if ( _pathBuilder . Count > 1 ) DrawPrimitivePath ( pen , _pathBuilder . Buffer , 0 , _pathBuilder . Count , PathType . Open ) ; }
Adds a primitive arc path to the batch of figures to be rendered using up to the given number of subdivisions.
Adds a primitive arc path to the batch of figures to be rendered using up to the given number of subdivisions .
DrawPrimitiveArc has not yet been called.
DrawPrimitiveArc 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 .
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 (radius / 1.5) * (arcAngle / 2PI)
The number of subdivisions in the arc is computed as ( radius / 1 . 5 ) * ( arcAngle / 2PI )