Class BufferGraphicsExtensions
- Namespace
- SharpConsoleUI.Drawing
- Assembly
- SharpConsoleUI.dll
Extension methods for drawing lines, circles, ellipses, and arcs on CharacterBuffer.
public static class BufferGraphicsExtensions
- Inheritance
-
BufferGraphicsExtensions
- Inherited Members
Methods
DrawArc(CharacterBuffer, int, int, int, double, double, char, Color, Color, LayoutRect?)
Draws an arc (portion of a circle) using parametric sampling. Angles are in radians, measured counter-clockwise from the positive X axis.
public static void DrawArc(this CharacterBuffer buffer, int cx, int cy, int radius, double startAngle, double endAngle, char ch, Color fg, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBuffercxintcyintradiusintstartAngledoubleendAngledoublechcharfgColorbgColorclipRectLayoutRect?
DrawCircle(CharacterBuffer, int, int, int, char, Color, Color, LayoutRect?)
Draws a circle outline using the midpoint circle algorithm.
public static void DrawCircle(this CharacterBuffer buffer, int cx, int cy, int radius, char ch, Color fg, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBuffercxintcyintradiusintchcharfgColorbgColorclipRectLayoutRect?
DrawEllipse(CharacterBuffer, int, int, int, int, char, Color, Color, LayoutRect?)
Draws an ellipse outline using the midpoint ellipse algorithm.
public static void DrawEllipse(this CharacterBuffer buffer, int cx, int cy, int rx, int ry, char ch, Color fg, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBuffercxintcyintrxintryintchcharfgColorbgColorclipRectLayoutRect?
DrawLine(CharacterBuffer, int, int, int, int, char, Color, Color, LayoutRect?)
Draws a line between two points using Bresenham's algorithm.
public static void DrawLine(this CharacterBuffer buffer, int x0, int y0, int x1, int y1, char ch, Color fg, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBufferx0inty0intx1inty1intchcharfgColorbgColorclipRectLayoutRect?
FillCircle(CharacterBuffer, int, int, int, char, Color, Color, LayoutRect?)
Draws a filled circle using the midpoint algorithm with horizontal scanlines.
public static void FillCircle(this CharacterBuffer buffer, int cx, int cy, int radius, char ch, Color fg, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBuffercxintcyintradiusintchcharfgColorbgColorclipRectLayoutRect?
FillEllipse(CharacterBuffer, int, int, int, int, char, Color, Color, LayoutRect?)
Draws a filled ellipse using the midpoint algorithm with horizontal scanlines.
public static void FillEllipse(this CharacterBuffer buffer, int cx, int cy, int rx, int ry, char ch, Color fg, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBuffercxintcyintrxintryintchcharfgColorbgColorclipRectLayoutRect?