Table of Contents

Class Debugger

Namespace
MonoEight.Core
Assembly
MonoEight.Template.dll

Provides static methods for drawing basic debug shapes, such as pixels, lines, and squares.

public static class Debugger
Inheritance
Debugger
Inherited Members

Methods

DrawCircle(SpriteBatch, Point, int, Color, int)

Draws a wireframe circle centered on the given position. The width of the wireframe is 1 pixel.

public static void DrawCircle(SpriteBatch spriteBatch, Point position, int radius, Color color, int width = 1)

Parameters

spriteBatch SpriteBatch

Microsoft.Xna.Framework.Graphics.SpriteBatch

position Point

The position of the circle

radius int

The radius of the circle.

color Color

The color of the circle.

width int

The width of the circle. Default is 1.

DrawLine(SpriteBatch, Point, Point, Color, int)

Draws a line between two given points. The line is 1 pixel wide.

public static void DrawLine(SpriteBatch spriteBatch, Point start, Point end, Color color, int width = 1)

Parameters

spriteBatch SpriteBatch

Microsoft.Xna.Framework.Graphics.SpriteBatch

start Point

The start point of the line.

end Point

The end point of the line.

color Color

The color of the line.

width int

The width of the line. Default is 1.

DrawPixel(SpriteBatch, Point, Color)

Draws a single pixel at the given position.

public static void DrawPixel(SpriteBatch spriteBatch, Point position, Color color)

Parameters

spriteBatch SpriteBatch

Microsoft.Xna.Framework.Graphics.SpriteBatch

position Point

The position of the pixel.

color Color

The color of the pixel.

DrawSquare(SpriteBatch, Point, Point, Color, int)

Draws a wireframe square centered on the given position. The width of the wireframe is 1 pixel.

public static void DrawSquare(SpriteBatch spriteBatch, Point position, Point size, Color color, int width = 1)

Parameters

spriteBatch SpriteBatch

Microsoft.Xna.Framework.Graphics.SpriteBatch

position Point

The position of the square.

size Point

The size of the square.

color Color

The color of the square.

width int

The width of the square. Default is 1.

Initialize(GraphicsDeviceManager)

Initializes the debugging tools by creating a 1x1 white texture used for drawing shapes.

public static void Initialize(GraphicsDeviceManager graphics)

Parameters

graphics GraphicsDeviceManager

Microsoft.Xna.Framework.GraphicsDeviceManager