Brush Interface Reference

Brush object represents the color and other options used to fill solid shapes. More...

Inheritance diagram for Brush:

Inheritance graph
Collaboration diagram for Brush:

Collaboration graph
List of all members.

Properties

LONG RW Style []
 Specifies the style of the brush.
VARIANT W Image []
 Specifies the image of the brush.
ULONG RW GradientColor []
 Specifies the GradientColor of the brush.

Detailed Description

Brush object represents the color and other options used to fill solid shapes.

Example:

o = new ActiveXObject("Scripting.WindowSystemObject")

o.EnableVisualStyles = true

f = o.CreateForm(0,0,0,0)

f.Text = "WSO"
f.ClientWidth = 200
f.ClientHeight = 100
f.CenterControl()

with (f.Ellipse(10,10,180,80).Brush)
{
        Color = 0x000000FF
        Style = o.Translate("B_DIAGONAL")
}

f.Show()

o.Run()

Result:

Brush.jpg


Property Documentation

ULONG RW GradientColor

Specifies the GradientColor of the brush.

This property is used only when the pen style is B_GRADIENT.

Example (JScript):

o = new ActiveXObject("Scripting.WindowSystemObject");

f = o.CreateForm(0,0,0,0);

f.ClientWidth = 150;
f.ClientHeight = 150;
f.CenterControl();

t = f.Ellipse(10,10,100,100);
t.Brush.Style = o.Translate("B_GRADIENT");
t.brush.GradientColor = 0x0000FF00;

f.Show();

o.Run();

Result:

Gradient.jpg

VARIANT W Image

Specifies the image of the brush.

If an image specified, the image defines the brush’s pattern.

LONG RW Style

Specifies the style of the brush.

This parameter can be a one of the following values:

B_CLEAR, B_SOLID, B_DIAGONAL, B_CROSS, B_DIAGCROSS, B_FDIAGONAL, B_HORIZONTAL, B_VERTICAL, B_BITMAP, B_GRADIENT.

When the B_GRADIENT value used, it may combined with the one of following values:

DIRECTION_TOP_BOTTOM, DIRECTION_LEFT_RIGHT, DIRECTION_BOTTOM_TOP, DIRECTION_RIGHT_LEFT, DIRECTION_TOP_CENTER_BOTTOM, DIRECTION_LEFT_CENTER_RIGHT.


WSO 1.1 Documentation. Date modified:Wed Aug 12 18:12:17 2015. (C) Veretennikov A. B. 2004-2015