Class Brush

Class Documentation

class sixtyfps::Brush

Brush is used to declare how to fill or outline shapes, such as rectangles, paths or text. A brush is either a solid color or a linear gradient.

Public Functions

inline Brush()

Constructs a new brush that is a transparent color.

inline Brush(const Color &color)

Constructs a new brush that is of color color.

inline Color color() const

Returns the color of the brush. If the brush is a gradient, this function returns the color of the first stop.

Friends

inline friend friend bool operator== (const Brush &a, const Brush &b)

Returns true if a is equal to b. If a holds a color, then b must also hold a color that is identical to a’s color. If it holds a gradient, then the gradients must be identical. Returns false if the brushes differ in what they hold or their respective color or gradient are not equal.

inline friend friend bool operator!= (const Brush &a, const Brush &b)

Returns false if is not equal to b; true otherwise.