Brush$Typings extension
- on
Properties
- color ↔ String
-
Available on Brush, provided by the Brush$Typings extension
Gets or sets the color of a solid Brush. The default value is 'black'. The value must be a valid CSS color string.getter/setter pair -
colorStops
↔ Map<
num, String> ? -
Available on Brush, provided by the Brush$Typings extension
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 0 and 1 (inclusive), and where the corresponding value is a color string.getter/setter pair - end ↔ Spot
-
Available on Brush, provided by the Brush$Typings extension
Gets or sets the ending location for a linear or radial gradient. A Spot value specifies a relative point in the object's GraphObject#naturalBounds. The default value is Spot.BottomCenter for linear gradients and Spot.Center for radial gradients.getter/setter pair - endRadius ↔ num
-
Available on Brush, provided by the Brush$Typings extension
Gets or sets the radius of a radial brush at the end location. The default value is NaN.getter/setter pair - pattern ↔ HTMLElement?
-
Available on Brush, provided by the Brush$Typings extension
Gets or sets the pattern of a brush of type Brush.Pattern.getter/setter pair - start ↔ Spot
-
Available on Brush, provided by the Brush$Typings extension
Gets or sets the starting location for a linear or radial gradient. A Spot value specifies a relative point in the object's GraphObject#naturalBounds. The default value is Spot.TopCenter for linear gradients and Spot.Center for radial gradients.getter/setter pair - startRadius ↔ num
-
Available on Brush, provided by the Brush$Typings extension
Gets or sets the radius of a radial brush at the start location. The default value is 0.getter/setter pair - type ↔ EnumValue
-
Available on Brush, provided by the Brush$Typings extension
Gets or sets the type of brush. The default value is Brush.Solid. The value must be one of: Brush.Solid, Brush.Linear, Brush.Radial, Brush.Pattern. If the new value is a linear or radial brush type, and if the #start or #end spots are not specific spots, they are changed to be specific spots, depending on the type of brush.getter/setter pair
Methods
-
addColorStop(
num loc, String color) → Brush -
Available on Brush, provided by the Brush$Typings extension
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 not have duplicate color stop values at the same fractional distance. @param {number} loc A number between 0 and 1 (inclusive). @param {string} color A valid CSS color string. @return {Brush} this Brush -
copy(
) → Brush -
Available on Brush, provided by the Brush$Typings extension
Create a copy of this Brush with the same values. @return {Brush} -
darkenBy(
[num? fraction, EnumValue? mode]) → Brush -
Available on Brush, provided by the Brush$Typings extension
Modifies all colors within this Brush, darkening them by some fraction. @param {number=} fraction Fraction to darken the colors by. Defaults to 0.2, must be between 0 and 1 (inclusive). @param {EnumValue=} mode Color space to use for adjusting. Must be Brush.Lab or Brush.HSL, defaults to Brush.Lab. @return {Brush} This Brush with modified color values. @since 1.7 -
isDark(
) → bool -
Available on Brush, provided by the Brush$Typings extension
This function determines whether this Brush is "dark." @return {boolean} @since 2.0 -
lightenBy(
[num? fraction, EnumValue? mode]) → Brush -
Available on Brush, provided by the Brush$Typings extension
Modifies all colors within this Brush, lightening them by some fraction. @param {number=} fraction Fraction to lighten the colors by. Defaults to 0.2, must be between 0 and 1 (inclusive). @param {EnumValue=} mode Color space to use for adjusting. Must be Brush.Lab or Brush.HSL, defaults to Brush.Lab. @return {Brush} This Brush with modified color values. @since 1.7