Table of Contents

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

brush Brush

The brush to copy.

opacity double

The opacity.

Returns

Brush

CreateGradientBrush(IList<Color>, bool)

Creates a gradient brush from a list of colors.

public static LinearGradientBrush CreateGradientBrush(IList<Color> colors, bool horizontal = true)

Parameters

colors IList<Color>

The colors.

horizontal bool

if set to true [horizontal].

Returns

LinearGradientBrush

A LinearGradientBrush.

CreateGradientBrush(params Color[])

Creates a gradient brush from the given colors.

public static LinearGradientBrush CreateGradientBrush(params Color[] colors)

Parameters

colors Color[]

The colors.

Returns

LinearGradientBrush

A LinearGradientBrush.

CreateGrayBrush(double)

Creates a gray brush.

public static SolidColorBrush CreateGrayBrush(double intensity)

Parameters

intensity double

The intensity of the gray color.

Returns

SolidColorBrush

CreateHsvBrush(double, bool)

Creates a HSV brush.

public static LinearGradientBrush CreateHsvBrush(double alpha = 1, bool horizontal = true)

Parameters

alpha double

The opacity (0-1).

horizontal bool

if set to true [horizontal].

Returns

LinearGradientBrush

LinearGradientBrush.

CreateRainbowBrush(bool)

Creates a rainbow brush.

public static LinearGradientBrush CreateRainbowBrush(bool horizontal = true)

Parameters

horizontal bool

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

colors IList<Color>

The colors.

horizontal bool

if set to true [horizontal].

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

gradient LinearGradientBrush

The gradient.

Returns

LinearGradientBrush

CreateSteppedGradientBrush(LinearGradientBrush, int)

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

public static LinearGradientBrush CreateSteppedGradientBrush(LinearGradientBrush gradient, int steps)

Parameters

gradient LinearGradientBrush

The gradient.

steps int

The number of steps.

Returns

LinearGradientBrush

CreateSteppedHsvBrush(int)

Creates a stepped HSV brush.

public static LinearGradientBrush CreateSteppedHsvBrush(int nSteps)

Parameters

nSteps int

The number of steps.

Returns

LinearGradientBrush