Class GradientRenderer
- Namespace
- SharpConsoleUI.Rendering
- Assembly
- SharpConsoleUI.dll
Fills regions of a CharacterBuffer with gradient colors. Supports horizontal, vertical, and diagonal gradient directions.
public static class GradientRenderer
- Inheritance
-
GradientRenderer
- Inherited Members
Methods
FillGradientBackground(CharacterBuffer, LayoutRect, ColorGradient, GradientDirection)
Fills the background color of cells in the specified rectangle with a gradient. Existing characters and foreground colors are preserved.
public static void FillGradientBackground(CharacterBuffer buffer, LayoutRect rect, ColorGradient gradient, GradientDirection direction)
Parameters
bufferCharacterBufferThe buffer to paint into.
rectLayoutRectThe rectangle to fill.
gradientColorGradientThe color gradient to apply.
directionGradientDirectionThe direction of the gradient.
FillGradientForeground(CharacterBuffer, LayoutRect, ColorGradient, GradientDirection)
Fills the foreground color of cells in the specified rectangle with a gradient. Existing characters and background colors are preserved.
public static void FillGradientForeground(CharacterBuffer buffer, LayoutRect rect, ColorGradient gradient, GradientDirection direction)
Parameters
bufferCharacterBufferThe buffer to paint into.
rectLayoutRectThe rectangle to fill.
gradientColorGradientThe color gradient to apply.
directionGradientDirectionThe direction of the gradient.