C
Brush Class
class Qul::PlatformInterface::BrushRepresents the fill pattern of shapes drawn using DrawingEngine. More...
Header: | #include <platforminterface/drawingengine.h> |
Since: | Qt Quick Ultralite (Platform) 1.8 |
Public Types
enum | Pattern { SolidPattern, LinearGradientPattern } |
Public Functions
Brush(const Qul::PlatformInterface::LinearGradient &linearGradient) | |
Brush(Qul::PlatformInterface::Rgba32 color) | |
Qul::PlatformInterface::Rgba32 | color() const |
const Qul::PlatformInterface::LinearGradient & | linearGradient() const |
Qul::PlatformInterface::Brush::Pattern | pattern() const |
Detailed Description
A brush has a pattern as specified by the pattern() method.
See also DrawingEngine::blendPath.
Member Type Documentation
enum Brush::Pattern
Defines the different brush patterns that are supported.
Constant | Value | Description |
---|---|---|
Qul::PlatformInterface::Brush::SolidPattern | 1 | A solid color pattern. |
Qul::PlatformInterface::Brush::LinearGradientPattern | 0 | A linear gradient pattern. |
Member Function Documentation
Brush::Brush(const Qul::PlatformInterface::LinearGradient &linearGradient)
Constructs a Qul::PlatformInterface::Brush::LinearGradient brush with the given linearGradient.
Brush::Brush(Qul::PlatformInterface::Rgba32 color)
Constructs a Qul::PlatformInterface::Brush::SolidPattern brush with the given color.
Qul::PlatformInterface::Rgba32 Brush::color() const
Returns the brush color.
Calling this function is only valid if the brush has the Qul::PlatformInterface::Brush::SolidPattern pattern. Otherwise, an assert will be triggered.
const Qul::PlatformInterface::LinearGradient &Brush::linearGradient() const
Returns the linear gradient parameters of the brush.
Calling this function is only valid if the brush has the Qul::PlatformInterface::Brush::LinearGradient pattern. Otherwise, an assert will be triggered.
Qul::PlatformInterface::Brush::Pattern Brush::pattern() const
Returns the brush pattern.
Available under certain Qt licenses.
Find out more.