Class Drawing
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
targetIRenderTargetThe target to draw to.
posVectorIntThe position of the cell.
colorColor?The color to set, or
nullto leave unchanged.glyphchar?The glyph to set, or
nullto leave unchanged.glyphColorColor?The glyph color to set, or
nullto leave unchanged.layerBoxDrawingCharsboolIndicates 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
targetIRenderTargetThe target to draw to.
posVectorIntThe position to center the circle on.
radiusfloatThe radius of the circle.
colorColorThe color to draw the circle in.
doubleWideboolIndicates that circle cells should be duplicated horizontally. This is useful for creating rounder circles in the terminal.
biasRightboolIndicates that the circle should be biased to the right if it is not centered on a a single cell.
filledboolIndicates 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
targetIRenderTargetThe target to draw to.
posVectorIntThe position to start drawing at.
contentIContentThe IContent to draw.
flipXboolIndicates that the content should be drawn flipped on the x-axis.
flipYboolIndicates 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
targetIRenderTargetThe target to draw to.
startVectorIntThe beginning of the line.
finishVectorIntThe end of the line.
colorColorThe color to draw the line in.
useBoxDrawingGlyphsboolIndicates that lines should be drawn with Unicode box-drawing glyphs.
flipVerticalGlyphConnectionsboolIndicates that the vertical connections of box-drawing glyphs should be flipped. This is useful when working in spaces with inverted y mapping.