Class PrimitiveBatch
Draws simple colored shapes through the active SpriteBatch.
public sealed class PrimitiveBatch
- Inheritance
-
PrimitiveBatch
- Inherited Members
Constructors
PrimitiveBatch(SpriteBatch)
Draws simple colored shapes through the active SpriteBatch.
public PrimitiveBatch(SpriteBatch spriteBatch)
Parameters
spriteBatchSpriteBatch
Methods
DrawCircle(Vector2, float, Color, float, int, CoordinateSpace, float)
Draws a circle outline using line segments.
public void DrawCircle(Vector2 center, float radius, Color color, float thickness = 1, int segments = 24, CoordinateSpace space = CoordinateSpace.Screen, float depth = 0)
Parameters
centerVector2radiusfloatcolorColorthicknessfloatsegmentsintspaceCoordinateSpacedepthfloat
DrawLine(Vector2, Vector2, Color, float, CoordinateSpace, float)
Draws a line with pixel thickness.
public void DrawLine(Vector2 start, Vector2 end, Color color, float thickness = 1, CoordinateSpace space = CoordinateSpace.Screen, float depth = 0)
Parameters
DrawRectangle(Vector2, Vector2, Color, float, CoordinateSpace, float)
Draws the outline of an axis-aligned rectangle.
public void DrawRectangle(Vector2 position, Vector2 size, Color color, float thickness = 1, CoordinateSpace space = CoordinateSpace.Screen, float depth = 0)
Parameters
FillCircle(Vector2, float, Color, CoordinateSpace, float)
Draws a filled circle as horizontal primitive spans.
public void FillCircle(Vector2 center, float radius, Color color, CoordinateSpace space = CoordinateSpace.Screen, float depth = 0)
Parameters
centerVector2radiusfloatcolorColorspaceCoordinateSpacedepthfloat
FillRectangle(Vector2, Vector2, Color, CoordinateSpace, float)
Draws a filled axis-aligned rectangle.
public void FillRectangle(Vector2 position, Vector2 size, Color color, CoordinateSpace space = CoordinateSpace.Screen, float depth = 0)
Parameters
positionVector2sizeVector2colorColorspaceCoordinateSpacedepthfloat