# Wiki

# 2D XNA Primitives / DrawCircle

# DrawCircle

### Draws a circle using one line segment per side.

The circle's comprising line segments are cached so that the circle does not need to be recalculated every frame.

```
public static void DrawCircle(this SpriteBatch spriteBatch, Vector2 center, float radius, int sides, Color color, float thickness = 1f)
```

```
public static void DrawCircle(this SpriteBatch spriteBatch, float x, float y, float radius, int sides, Color color, float thickness = 1f)
```

Parameter Name | Description |
---|---|

spriteBatch | The destination drawing surface |

x | The x coordinate of the center of the circle |

y | The y coordinate of the center of the circle |

center | The center of the circle |

radius | The radius of the circle |

sides | The number of sides to generate |

color | The color of the circle |

thickness | The thickness of the circle. Default = 1f |

Updated