NShape Reference
ToolCache.GetBrush Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.Advanced > ToolCache Class >

NShape Reference
ToolCache.GetBrush Method

Previous pageReturn to chapter overviewNext page

Creates a brush from the given styles.

Syntax

public static Brush GetBrush(IColorStyle colorStyle)

public static Brush GetBrush(IColorStyle colorStyle, ILineStyle lineStyle)

public static Brush GetBrush(IFillStyle fillStyle)

Description

Creates a System.Drawing.Brush from the given styles and stores it for future use.

Parameters

Name

Description

colorStyle

Specifies the color of the created solid color brush.

lineStyle

if the given ColorStyle is ColorStyle.Empty, the LineStyle.ColorStyle property is used to create a solid color brush.

fillStyle

Specifies the parameters for the brush. Depending on the FillStyle.FillMode property, the created brush is a SolidBrush, a HatchBrush, a LinearGradientBrush or a TextureBrush.

Exceptions

Exception

Condition

ArgumentNullException

Any of the given styles is null.