StaticcreateCreates a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering drop shadows or highlights for boxes.
The size and position of the box gradient rectangle.
The gradient starting color.
The gradient ending color.
Optionalradius: numberDefines the rectangle corner radius.
Optionalfeather: numberDefines the rectangle feather. Feather defines how blurry the border of the rectangle is.
A newly created paint object.
StaticcreateStaticcreateStaticcreate
A structure type that describes a color, linear gradient, box gradient or radial gradient painting options.
Solid color paint is the most basic type of paint. They are just a single color that fills the entire region to be painted.
The linear gradient paint is a type of paint that creates a linear gradient, that is, a gradient that goes from one color to another in a unique direction.
The linear gradient is composed of: - The starting and ending colors; - Two vectors that represent where the gradient should start and where it should end. Values above or below those limits get clamped to their maximum or minimum.
The box gradient paint is a type of paint that creates a rectangular gradient. This gradient type is very common in user interfaces to create shadow and highlight effects.
The box gradient is composed of: - The starting and ending colors; - A rectangle that defines the boundaries of the gradient;
The radial gradient paint is a type of paint that creates a circular gradient whose colors are interpolated based on it's distance from the center.
The radial gradient is composed of: - The starting and ending colors; - A center vector that defines the place where the gradient starts; - A inner and outer radius that represent where the gradient should start and where it should end. Values above or below those limits get clamped to their maximum or minimum.