Table of Contents

Class Drawing

Namespace
Termule.Engine.Systems.Rendering
Assembly
Termule.Engine.dll

A collection of extension methods for drawing to IRenderTargets.

public static class Drawing
Inheritance
Drawing
Inherited Members

Methods

Draw(IRenderTarget, VectorInt, Color?, char?, Color?, bool)

Draws to a cell on this IRenderTarget.

public static void Draw(this IRenderTarget target, VectorInt pos, Color? color = null, char? glyph = null, Color? glyphColor = null, bool layerBoxDrawingChars = true)

Parameters

target IRenderTarget

The target to draw to.

pos VectorInt

The position of the cell.

color Color?

The color to set, or null to leave unchanged.

glyph char?

The glyph to set, or null to leave unchanged.

glyphColor Color?

The glyph color to set, or null to leave unchanged.

layerBoxDrawingChars bool

Indicates that drawing Unicode box-drawing glyphs over existing box-drawing glyphs of the same color should combine them.

DrawCircle(IRenderTarget, VectorInt, float, Color, bool, bool, bool)

Draws a circle to this IRenderTarget.

public static void DrawCircle(this IRenderTarget target, VectorInt pos, float radius, Color color, bool doubleWide = false, bool biasRight = true, bool filled = false)

Parameters

target IRenderTarget

The target to draw to.

pos VectorInt

The position to center the circle on.

radius float

The radius of the circle.

color Color

The color to draw the circle in.

doubleWide bool

Indicates that circle cells should be duplicated horizontally. This is useful for creating rounder circles in the terminal.

biasRight bool

Indicates that the circle should be biased to the right if it is not centered on a a single cell.

filled bool

Indicates that the interior cells of the circle should be filled.

DrawContent(IRenderTarget, VectorInt, IContent, bool, bool)

Draws a piece of IContent to this IRenderTarget.

public static void DrawContent(this IRenderTarget target, VectorInt pos, IContent content, bool flipX = false, bool flipY = false)

Parameters

target IRenderTarget

The target to draw to.

pos VectorInt

The position to start drawing at.

content IContent

The IContent to draw.

flipX bool

Indicates that the content should be drawn flipped on the x-axis.

flipY bool

Indicates that the content should be drawn flipped on the y-axis.

DrawLine(IRenderTarget, VectorInt, VectorInt, Color, bool, bool)

Draws a line to this IRenderTarget.

public static void DrawLine(this IRenderTarget target, VectorInt start, VectorInt finish, Color color, bool useBoxDrawingGlyphs = false, bool flipVerticalGlyphConnections = false)

Parameters

target IRenderTarget

The target to draw to.

start VectorInt

The beginning of the line.

finish VectorInt

The end of the line.

color Color

The color to draw the line in.

useBoxDrawingGlyphs bool

Indicates that lines should be drawn with Unicode box-drawing glyphs.

flipVerticalGlyphConnections bool

Indicates that the vertical connections of box-drawing glyphs should be flipped. This is useful when working in spaces with inverted y mapping.