Class BufferGradientExtensions
- Namespace
- SharpConsoleUI.Drawing
- Assembly
- SharpConsoleUI.dll
Extension methods for gradient, pattern, and stipple fills on CharacterBuffer.
public static class BufferGradientExtensions
- Inheritance
-
BufferGradientExtensions
- Inherited Members
Methods
CheckerFill(CharacterBuffer, LayoutRect, char, char, Color, Color, Color, LayoutRect?)
Fills a rectangle with alternating characters in a checkerboard pattern.
public static void CheckerFill(this CharacterBuffer buffer, LayoutRect rect, char ch1, char ch2, Color fg1, Color fg2, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBufferrectLayoutRectch1charch2charfg1Colorfg2ColorbgColorclipRectLayoutRect?
GradientFillHorizontal(CharacterBuffer, LayoutRect, char, Color, Color, Color, LayoutRect?)
Fills a rectangle with a horizontal foreground color gradient (left to right).
public static void GradientFillHorizontal(this CharacterBuffer buffer, LayoutRect rect, char ch, Color fgStart, Color fgEnd, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBufferrectLayoutRectchcharfgStartColorfgEndColorbgColorclipRectLayoutRect?
GradientFillRect(CharacterBuffer, LayoutRect, Color, Color, bool, LayoutRect?)
Fills a rectangle with a background color gradient (no visible character).
public static void GradientFillRect(this CharacterBuffer buffer, LayoutRect rect, Color bgStart, Color bgEnd, bool horizontal, LayoutRect? clipRect = null)
Parameters
bufferCharacterBufferrectLayoutRectbgStartColorbgEndColorhorizontalboolclipRectLayoutRect?
GradientFillVertical(CharacterBuffer, LayoutRect, char, Color, Color, Color, LayoutRect?)
Fills a rectangle with a vertical foreground color gradient (top to bottom).
public static void GradientFillVertical(this CharacterBuffer buffer, LayoutRect rect, char ch, Color fgStart, Color fgEnd, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBufferrectLayoutRectchcharfgStartColorfgEndColorbgColorclipRectLayoutRect?
PatternFill(CharacterBuffer, LayoutRect, string[], Color, Color, LayoutRect?)
Fills a rectangle with a repeating 2D character pattern. Each string in the pattern array represents one row of the repeating tile.
public static void PatternFill(this CharacterBuffer buffer, LayoutRect rect, string[] pattern, Color fg, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBufferrectLayoutRectpatternstring[]fgColorbgColorclipRectLayoutRect?
StippleFill(CharacterBuffer, LayoutRect, double, Color, Color, LayoutRect?)
Fills a rectangle with a density-based stipple pattern. Density ranges from 0.0 (empty) to 1.0 (fully filled). Uses a deterministic hash for consistent results across redraws.
public static void StippleFill(this CharacterBuffer buffer, LayoutRect rect, double density, Color fg, Color bg, LayoutRect? clipRect = null)
Parameters
bufferCharacterBufferrectLayoutRectdensitydoublefgColorbgColorclipRectLayoutRect?