Class BrushHelper
- Namespace
- HelixToolkit.Wpf
- Assembly
- HelixToolkit.Wpf.dll
Provides methods that creates brushes.
public static class BrushHelper
- Inheritance
-
BrushHelper
- Inherited Members
Methods
ChangeOpacity(Brush, double)
Creates a copy of a brush with the specified opacity.
public static Brush ChangeOpacity(Brush brush, double opacity)
Parameters
Returns
CreateGradientBrush(IList<Color>, bool)
Creates a gradient brush from a list of colors.
public static LinearGradientBrush CreateGradientBrush(IList<Color> colors, bool horizontal = true)
Parameters
Returns
- LinearGradientBrush
A LinearGradientBrush.
CreateGradientBrush(params Color[])
Creates a gradient brush from the given colors.
public static LinearGradientBrush CreateGradientBrush(params Color[] colors)
Parameters
colorsColor[]The colors.
Returns
- LinearGradientBrush
A LinearGradientBrush.
CreateGrayBrush(double)
Creates a gray brush.
public static SolidColorBrush CreateGrayBrush(double intensity)
Parameters
intensitydoubleThe intensity of the gray color.
Returns
CreateHsvBrush(double, bool)
Creates a HSV brush.
public static LinearGradientBrush CreateHsvBrush(double alpha = 1, bool horizontal = true)
Parameters
Returns
- LinearGradientBrush
LinearGradientBrush.
CreateRainbowBrush(bool)
Creates a rainbow brush.
public static LinearGradientBrush CreateRainbowBrush(bool horizontal = true)
Parameters
horizontalbool
Returns
- LinearGradientBrush
A rainbow brush.
CreateSteppedGradientBrush(IList<Color>, bool)
Creates a 'stepped' gradient brush from a list of colors.
public static LinearGradientBrush CreateSteppedGradientBrush(IList<Color> colors, bool horizontal = true)
Parameters
Returns
- LinearGradientBrush
A gradientbrush.
CreateSteppedGradientBrush(LinearGradientBrush)
Creates the stepped gradient brush (same number of steps as the number of stops in the gradient).
public static LinearGradientBrush CreateSteppedGradientBrush(LinearGradientBrush gradient)
Parameters
gradientLinearGradientBrushThe gradient.
Returns
CreateSteppedGradientBrush(LinearGradientBrush, int)
Creates the stepped gradient brush (any number of steps).
public static LinearGradientBrush CreateSteppedGradientBrush(LinearGradientBrush gradient, int steps)
Parameters
gradientLinearGradientBrushThe gradient.
stepsintThe number of steps.
Returns
CreateSteppedHsvBrush(int)
Creates a stepped HSV brush.
public static LinearGradientBrush CreateSteppedHsvBrush(int nSteps)
Parameters
nStepsintThe number of steps.