Table of Contents

Class PrimitiveBatch

Namespace
Axolotl2D.Rendering
Assembly
Axolotl2D.dll

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

spriteBatch SpriteBatch

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

center Vector2
radius float
color Color
thickness float
segments int
space CoordinateSpace
depth float

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

start Vector2
end Vector2
color Color
thickness float
space CoordinateSpace
depth float

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

position Vector2
size Vector2
color Color
thickness float
space CoordinateSpace
depth float

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

center Vector2
radius float
color Color
space CoordinateSpace
depth float

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

position Vector2
size Vector2
color Color
space CoordinateSpace
depth float