creativity
v1.3.0
Agent-based model of creativity and piracy
|
Style class for a filled, rectangular region. More...
#include <creativity/data/graph/style.hpp>
Public Member Functions | |
RectangleStyle (RectangleStyle &&)=default | |
Default move constructor. | |
RectangleStyle (const RectangleStyle &)=default | |
Default copy constructor. | |
RectangleStyle & | operator= (RectangleStyle &&)=default |
Default move assignment. | |
RectangleStyle & | operator= (const RectangleStyle &)=default |
Default copy assignment. | |
RectangleStyle (FillStyle f) | |
Initialize using a FillStyle. | |
double | borderT () const |
Returns the border width if the top border is to be drawn, 0 otherwise. | |
double | borderR () const |
Returns the border width if the right border is to be drawn, 0 otherwise. | |
double | borderB () const |
Returns the border width if the bottom border is to be drawn, 0 otherwise. | |
double | borderL () const |
Returns the border width if the left border is to be drawn, 0 otherwise. | |
double | borderLR () const |
Returns the total drawn horizontal border width, i.e. borderR() + borderL() | |
double | borderTB () const |
Returns the total drawn vertical border width, i.e. borderT() + borderB() | |
![]() | |
FillStyle (RGBA fill) | |
Constructs a FillStyle using just a fill colour: the borders will be omitted (i.e. More... | |
FillStyle (RGBA fill, LineStyle border) | |
Constructs a FillStyle using a fill colour and line style for the borders. More... | |
FillStyle (LineStyle border) | |
Constructs a FillStyle using just a LineStyle; the fill will be omitted (i.e. transparent). | |
FillStyle (FillStyle &&)=default | |
Move constructor. | |
FillStyle (const FillStyle &)=default | |
Copy constructor. | |
FillStyle & | operator= (FillStyle &&)=default |
Default move assignment. | |
FillStyle & | operator= (const FillStyle &)=default |
Default copy assignment. | |
Public Attributes | |
bool | border_top = true |
bool | border_right = true |
bool | border_bottom = true |
bool | border_left = true |
![]() | |
RGBA | fill_colour |
The fill colour for the region. | |
LineStyle | border |
The border colour for the region. | |
Style class for a filled, rectangular region.
In addition to the fill colour and border of a FillStyle, this also allows any of the 4 borders to be disabled.
bool creativity::data::graph::RectangleStyle::border_bottom = true |
True if the named border should be drawn, false if not. Only applies when drawing rectangles.
bool creativity::data::graph::RectangleStyle::border_left = true |
True if the named border should be drawn, false if not. Only applies when drawing rectangles.
bool creativity::data::graph::RectangleStyle::border_right = true |
True if the named border should be drawn, false if not. Only applies when drawing rectangles.
bool creativity::data::graph::RectangleStyle::border_top = true |
True if the named border should be drawn, false if not. Only applies when drawing rectangles.