C# Class HelixToolkit.Wpf.BrushHelper

Provides methods that creates brushes.
Show file Open project: litdev1/LitDev Class Usage Examples

Public Methods

Method Description
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.

Method Details

ChangeOpacity() public static method

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. ///
return System.Windows.Media.Brush

CreateGradientBrush() public static method

Creates a gradient brush from the given colors.
public static CreateGradientBrush ( ) : System.Windows.Media.LinearGradientBrush
return System.Windows.Media.LinearGradientBrush

CreateGradientBrush() public static method

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].
return System.Windows.Media.LinearGradientBrush

CreateGrayBrush() public static method

Creates a gray brush.
public static CreateGrayBrush ( double intensity ) : SolidColorBrush
intensity double /// The intensity of the gray color. ///
return System.Windows.Media.SolidColorBrush

CreateHsvBrush() public static method

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].
return System.Windows.Media.LinearGradientBrush

CreateRainbowBrush() public static method

Creates a rainbow brush.
public static CreateRainbowBrush ( bool horizontal = true ) : System.Windows.Media.LinearGradientBrush
horizontal bool
return System.Windows.Media.LinearGradientBrush

CreateSteppedGradientBrush() public static method

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].
return System.Windows.Media.LinearGradientBrush

CreateSteppedGradientBrush() public static method

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. ///
return System.Windows.Media.LinearGradientBrush

CreateSteppedGradientBrush() public static method

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. ///
return System.Windows.Media.LinearGradientBrush

CreateSteppedHsvBrush() public static method

Creates a stepped HSV brush.
public static CreateSteppedHsvBrush ( int nSteps ) : System.Windows.Media.LinearGradientBrush
nSteps int /// The number of steps. ///
return System.Windows.Media.LinearGradientBrush