HatchBrush class

Applies to: desktop apps only

This HatchBrush class defines a rectangular brush with a hatch style, a foreground color, and a background color. There are six hatch styles. The foreground color defines the color of the hatch lines; the background color defines the color over which the hatch lines are drawn.

Members

The HatchBrush class inherits from Brush. HatchBrush also has these types of members:

Constructors

The HatchBrush class has these constructors.

ConstructorDescription
HatchBrush::HatchBrush

Creates a HatchBrush::HatchBrush object based on a hatch style, a foreground color, and a background color.

 

Methods

The HatchBrush class has these methods.

MethodDescription
HatchBrush::GetBackgroundColor

The HatchBrush::GetBackgroundColor method gets the background color of this hatch brush.

HatchBrush::GetForegroundColor

The HatchBrush::GetForegroundColor method gets the foreground color of this hatch brush.

HatchBrush::GetHatchStyle

The HatchBrush::GetHatchStyle method gets the hatch style of this hatch brush.

 

Remarks

Hatches are applied to shape interiors in the device space. As a result, they maintain their appearance in device space and are unaffected by current transformations in the graphics context. Such brushes are also called nonscalable brushes. Hatches are aligned at the upper-left corner of the display device. When the graphics engine uses a HatchBrush object to paint a shape, it first transforms the shape to device space before applying the hatch to the interiors. Hatches are always tiled to paint the interiors.

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show: