Small class for the view background settings. More...
Public Member Functions | |
Background () | |
Constructs an empty object. More... | |
Background (const Background &other) | |
Constructs a background object as a copy of other. More... | |
Background & | operator= (const Background &rhs) |
Assigns rhs to this background and returns a reference to this background. More... | |
Color3f | topColor () const |
Returns the top color of the background. More... | |
Color3f | bottomColor () const |
Returns the bottom color of the background. More... | |
void | setSingleColor (const Color3f &color) |
Sets the background color to color (single color) More... | |
void | setTopAndBottomColor (const Color3f &topColor, const Color3f &bottomColor) |
Sets the background color to a gradient defined by a top color and a bottom color. More... | |
Static Public Member Functions | |
static Background | createSingleColor (const Color3f &color) |
Returns a single color background configured with the given color. More... | |
static Background | createTopAndBottomColor (const Color3f &topColor, const Color3f &bottomColor) |
Returns a top/bottom color background configured with the given colors. More... | |
Small class for the view background settings.
The Background class defines the view background settings. The background can either be single colored or be a gradient between a top and a bottom color.
Get the background of a view with View::background().
cee::vis::Background::Background | ( | ) |
Constructs an empty object.
cee::vis::Background::Background | ( | const Background & | other | ) |
Constructs a background object as a copy of other.
cee::Color3f cee::vis::Background::bottomColor | ( | ) | const |
Returns the bottom color of the background.
If background is single color, topColor() and bottomColor() returns the same color.
|
static |
Returns a single color background configured with the given color.
|
static |
Returns a top/bottom color background configured with the given colors.
Background & cee::vis::Background::operator= | ( | const Background & | rhs | ) |
Assigns rhs to this background and returns a reference to this background.
void cee::vis::Background::setSingleColor | ( | const Color3f & | color | ) |
Sets the background color to color (single color)
Same as setTopAndBottomColor(color, color). Provided for convenience.
void cee::vis::Background::setTopAndBottomColor | ( | const Color3f & | topColor, |
const Color3f & | bottomColor | ||
) |
Sets the background color to a gradient defined by a top color and a bottom color.
cee::Color3f cee::vis::Background::topColor | ( | ) | const |
Returns the top color of the background.
If background is single color, topColor() and bottomColor() returns the same color.