Clone wiki

2D XNA Primitives / DrawArc

DrawArc

Draws part of a circle using lines.

public static void DrawArc(this SpriteBatch spriteBatch, Vector2 center, float radius, int sides, float startingAngle, float degrees, Color color, float thickness = 1f)
Parameter NameDescription
spriteBatchThe destination drawing surface
centerThe center of the arc
radiusThe radius of the arc
sidesThe number of sides to generate
startingAngleThe starting angle of arc in degrees, 0 being to the east, 90 being south
degreesThe number of degrees to draw, clockwise from the starting angle
colorThe color of the arc
thicknessThe thickness of the arc. Default = 1f

Updated