Class WBrush


public class WBrush
extends WJavaScriptExposableObject
A value class that defines the style for filling a path.

A brush defines the properties of how areas (the interior of shapes) are filled. A brush is defined either as a solid color or a gradient.

JavaScript exposability

A WBrush is JavaScript exposable. If a WBrush is JavaScript bound, it can be accessed in your custom JavaScript code through its handle's jsRef(). At the moment, only the getColor() property is exposed, e.g. a brush with the color WColor(10,20,30,255) will be represented in JavaScript as:

 color: [10,20,30,255]


Warning: A WBrush that is JavaScript exposed should be modified only through its handle. Any attempt at modifying it will cause an exception to be thrown.

See Also:
WPainter.setBrush(WBrush b), WPen, WPaintedWidget.createJSBrush()