Chemical Data Processing Library C++ API - Version 1.2.0
|
Specifies the fill pattern and fill color of shapes. More...
#include <Brush.hpp>
Public Types | |
enum | Style { NO_PATTERN , SOLID_PATTERN , DENSE1_PATTERN , DENSE2_PATTERN , DENSE3_PATTERN , DENSE4_PATTERN , DENSE5_PATTERN , DENSE6_PATTERN , DENSE7_PATTERN , H_PATTERN , V_PATTERN , CROSS_PATTERN , LEFT_DIAG_PATTERN , RIGHT_DIAG_PATTERN , DIAG_CROSS_PATTERN } |
Defines constants for supported fill pattern styles. More... | |
Public Member Functions | |
Brush () | |
Constructs a brush with fill pattern style Brush::NO_PATTERN and color Color::BLACK. More... | |
Brush (Style style) | |
Constructs a brush with the specified fill pattern style and the color Color::BLACK. More... | |
Brush (const Color &color, Style style=SOLID_PATTERN) | |
Constructs a brush with the specified fill pattern style and color. More... | |
void | setStyle (Style style) |
Sets the fill pattern style. More... | |
Style | getStyle () const |
Returns the fill pattern style. More... | |
void | setColor (const Color &color) |
Sets the fill pattern color. More... | |
const Color & | getColor () const |
Returns the fill pattern color. More... | |
bool | operator== (const Brush &brush) const |
Equality comparison operator. More... | |
bool | operator!= (const Brush &brush) const |
Inequality comparison operator. More... | |
Specifies the fill pattern and fill color of shapes.
A brush has a style and a color attribute. The style defines the look of the fill pattern and the color attribute specifies the color of the specified fill pattern. The style of a default constructed Brush
object is Brush::NO_PATTERN, which tells the renderer not to fill drawn shapes.
Defines constants for supported fill pattern styles.
CDPL::Vis::Brush::Brush | ( | ) |
Constructs a brush with fill pattern style Brush::NO_PATTERN and color Color::BLACK.
CDPL::Vis::Brush::Brush | ( | Style | style | ) |
Constructs a brush with the specified fill pattern style and the color Color::BLACK.
style | The style of the fill pattern. |
CDPL::Vis::Brush::Brush | ( | const Color & | color, |
Style | style = SOLID_PATTERN |
||
) |
Constructs a brush with the specified fill pattern style and color.
color | The fill pattern color. |
style | The fill pattern style . |
void CDPL::Vis::Brush::setStyle | ( | Style | style | ) |
Sets the fill pattern style.
style | The the fill pattern style. |
Style CDPL::Vis::Brush::getStyle | ( | ) | const |
Returns the fill pattern style.
void CDPL::Vis::Brush::setColor | ( | const Color & | color | ) |
Sets the fill pattern color.
color | The fill pattern color. |
const Color& CDPL::Vis::Brush::getColor | ( | ) | const |
Returns the fill pattern color.
Equality comparison operator.
brush | The other Brush object to be compared with. |
true
if the style and color attributes compare equal, and false
otherwise. Inequality comparison operator.
The result is equivalent to !(*this == brush)
.
brush | The other Brush object to be compared with. |
true
if either the style or the color attributes compare non-equal, and false
otherwise.