C# Класс HelixToolkit.Wpf.BrushHelper

Provides methods that creates brushes.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ChangeOpacity ( System.Windows.Media.Brush brush, double opacity ) : System.Windows.Media.Brush

Creates a copy of a brush with the specified opacity.

CreateGradientBrush ( ) : System.Windows.Media.LinearGradientBrush

Creates a gradient brush from the given colors.

CreateGradientBrush ( IList colors, bool horizontal = true ) : System.Windows.Media.LinearGradientBrush

Creates a gradient brush from a list of colors.

CreateGrayBrush ( double intensity ) : SolidColorBrush

Creates a gray brush.

CreateHsvBrush ( double alpha = 1, bool horizontal = true ) : System.Windows.Media.LinearGradientBrush

Creates a HSV brush.

CreateRainbowBrush ( bool horizontal = true ) : System.Windows.Media.LinearGradientBrush

Creates a rainbow brush.

CreateSteppedGradientBrush ( IList colors, bool horizontal = true ) : System.Windows.Media.LinearGradientBrush

Creates a 'stepped' gradient brush from a list of colors.

CreateSteppedGradientBrush ( System.Windows.Media.LinearGradientBrush gradient ) : System.Windows.Media.LinearGradientBrush

Creates the stepped gradient brush (same number of steps as the number of stops in the gradient).

CreateSteppedGradientBrush ( System.Windows.Media.LinearGradientBrush gradient, int steps ) : System.Windows.Media.LinearGradientBrush

Creates the stepped gradient brush (any number of steps).

CreateSteppedHsvBrush ( int nSteps ) : System.Windows.Media.LinearGradientBrush

Creates a stepped HSV brush.

Описание методов

ChangeOpacity() публичный статический Метод

Creates a copy of a brush with the specified opacity.
public static ChangeOpacity ( System.Windows.Media.Brush brush, double opacity ) : System.Windows.Media.Brush
brush System.Windows.Media.Brush /// The brush to copy. ///
opacity double /// The opacity. ///
Результат System.Windows.Media.Brush

CreateGradientBrush() публичный статический Метод

Creates a gradient brush from the given colors.
public static CreateGradientBrush ( ) : System.Windows.Media.LinearGradientBrush
Результат System.Windows.Media.LinearGradientBrush

CreateGradientBrush() публичный статический Метод

Creates a gradient brush from a list of colors.
public static CreateGradientBrush ( IList colors, bool horizontal = true ) : System.Windows.Media.LinearGradientBrush
colors IList The colors.
horizontal bool if set to true [horizontal].
Результат System.Windows.Media.LinearGradientBrush

CreateGrayBrush() публичный статический Метод

Creates a gray brush.
public static CreateGrayBrush ( double intensity ) : SolidColorBrush
intensity double /// The intensity of the gray color. ///
Результат System.Windows.Media.SolidColorBrush

CreateHsvBrush() публичный статический Метод

Creates a HSV brush.
public static CreateHsvBrush ( double alpha = 1, bool horizontal = true ) : System.Windows.Media.LinearGradientBrush
alpha double The opacity (0-1).
horizontal bool if set to true [horizontal].
Результат System.Windows.Media.LinearGradientBrush

CreateRainbowBrush() публичный статический Метод

Creates a rainbow brush.
public static CreateRainbowBrush ( bool horizontal = true ) : System.Windows.Media.LinearGradientBrush
horizontal bool
Результат System.Windows.Media.LinearGradientBrush

CreateSteppedGradientBrush() публичный статический Метод

Creates a 'stepped' gradient brush from a list of colors.
public static CreateSteppedGradientBrush ( IList colors, bool horizontal = true ) : System.Windows.Media.LinearGradientBrush
colors IList The colors.
horizontal bool if set to true [horizontal].
Результат System.Windows.Media.LinearGradientBrush

CreateSteppedGradientBrush() публичный статический Метод

Creates the stepped gradient brush (same number of steps as the number of stops in the gradient).
public static CreateSteppedGradientBrush ( System.Windows.Media.LinearGradientBrush gradient ) : System.Windows.Media.LinearGradientBrush
gradient System.Windows.Media.LinearGradientBrush /// The gradient. ///
Результат System.Windows.Media.LinearGradientBrush

CreateSteppedGradientBrush() публичный статический Метод

Creates the stepped gradient brush (any number of steps).
public static CreateSteppedGradientBrush ( System.Windows.Media.LinearGradientBrush gradient, int steps ) : System.Windows.Media.LinearGradientBrush
gradient System.Windows.Media.LinearGradientBrush /// The gradient. ///
steps int /// The number of steps. ///
Результат System.Windows.Media.LinearGradientBrush

CreateSteppedHsvBrush() публичный статический Метод

Creates a stepped HSV brush.
public static CreateSteppedHsvBrush ( int nSteps ) : System.Windows.Media.LinearGradientBrush
nSteps int /// The number of steps. ///
Результат System.Windows.Media.LinearGradientBrush