A Brush holds color information and describes how to draw the inside of a Shape or the stroke of a shape or a TextBlock or the background of any GraphObject. A Brush must not be modified once it has been assigned to a GraphObject, such as the Shape#fill or TextBlock#stroke or GraphObject#background. However, a Brush may be shared by multiple GraphObjects.
Construct a Brush class of a given type.
one of the values Brush#Solid, Brush#Linear, Brush#Radial, Brush#Pattern.
Construct a solid color Brush that holds the given color information.
a well-formed CSS string describing a solid color brush; if not supplied uses 'black'.
For linear gradient brushes, used as the value for Brush#type.
For pattern brushes, used as the value for Brush#type.
For radial gradient brushes, used as the value for Brush#type.
For simple, solid color brushes, used as the value for Brush#type.
Gets or sets the color of a solid Brush.
Gets or sets a Map holding all of the color stops used in this gradient, where the key is a number, the fractional distance between zero and one (inclusive), and where the corresponding value is a color string.
Gets or sets the ending location for a linear or radial gradient.
Gets or sets the radius of a radial brush at the end location.
Gets or sets the pattern of a brush of type Brush#Pattern, an HTMLImageElement or HTMLCanvasElement.
Gets or sets the starting location for a linear or radial gradient.
Gets or sets the radius of a radial brush at the start location.
Gets or sets the type of brush.
Specify a particular color at a particular fraction of the distance. If the #type is Brush#Solid, change the type to Brush#Linear. You should have a color stop at zero and a color stop at one. You should not have duplicate color stop values at the same fractional distance.
between zero and one, inclusive.
a CSS color string
any
Create a copy of this Brush, with the same values.
This static method can be used to generate a random color string.
a number between zero and 255, defaults to 128.
a number between zero and 255, defaults to 255.
string