Methods | Fields | This Package | All Packages

Brush Class

Encapsulates a Windows brush, a tool that Win32-based applications use to paint the interior of polygons and ellipses.

package com.ms.wfc.ui

public class Brush

Remarks

A brush is used to fill areas of a window or a Graphics region. You can use the constants defined in the Brush and BrushStyle classes to create a Brush object that represents the pattern or color (or both) with which you want to paint enclosed areas. Optionally, you can create a Brush object based on a bitmap that you read from a disk file or create in memory.

Brushes come in three varieties:  solid, pattern, and hatched.

A solid brush can consist of any color, and can consist additionally of a color or pattern specifically defined by some element of the Windows user interface.

A hatched brush consists of a combination of a color and of one of the six patterns defined by Windows.

A pattern brush consists of a bitmap that is used as the basis for a pattern that fills a shape. Where the area to be filled is larger than the bitmap, the bitmap is tiled horizontally and vertically across the display. Pattern brushes enable you to create custom brushes that consist of any pattern that you define.