Table of Contents

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

buffer CharacterBuffer

The buffer to paint into.

rect LayoutRect

The rectangle to fill.

gradient ColorGradient

The color gradient to apply.

direction GradientDirection

The 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

buffer CharacterBuffer

The buffer to paint into.

rect LayoutRect

The rectangle to fill.

gradient ColorGradient

The color gradient to apply.

direction GradientDirection

The direction of the gradient.