|
codac 2.0.0
|
Style properties structure, to specify the style of a shape. More...
#include <codac2_StyleProperties.h>

Public Member Functions | |
| StyleProperties () | |
| Default constructor. | |
| StyleProperties (const Color &stroke_color, const std::string ¶m1="", const std::string ¶m2="", const std::string ¶m3="") | |
| Constructor from a stroke color, and two optional parameters. | |
| StyleProperties (std::initializer_list< Color > colors, const std::string ¶m1="", const std::string ¶m2="", const std::string ¶m3="") | |
| Constructor from a stroke and eventually a fill color, and two optional parameters. | |
| void | parse_parameter (const std::string ¶m) |
| Parse a parameter and update the style properties accordingly. | |
Static Public Member Functions | |
| static StyleProperties | inside () |
| Predefined "inside" style, dark gray edge and green fill. | |
| static StyleProperties | outside () |
| Predefined "outside" style, dark gray edge and light blue fill. | |
| static StyleProperties | boundary () |
| Predefined "boundary" style, dark gray edge and yellow fill. | |
| static std::set< std::string > | available_line_styles () |
| Set of available line styles. | |
Style properties structure, to specify the style of a shape.
This class is used to specify the style of a shape, including the stroke color, fill color, line style and layer.
| codac2::StyleProperties::StyleProperties | ( | ) |
Default constructor.
Black stroke color, transparent fill color, solid line style and layer "alpha"
| codac2::StyleProperties::StyleProperties | ( | const Color & | stroke_color, |
| const std::string & | param1 = "", | ||
| const std::string & | param2 = "", | ||
| const std::string & | param3 = "" ) |
Constructor from a stroke color, and two optional parameters.
| stroke_color | Stroke color |
| param1 | Optional parameter, can be layer name or line style |
| param2 | Optional parameter, can be layer name or line style |
| param3 | Optional parameter, can be layer name or line style |
| codac2::StyleProperties::StyleProperties | ( | std::initializer_list< Color > | colors, |
| const std::string & | param1 = "", | ||
| const std::string & | param2 = "", | ||
| const std::string & | param3 = "" ) |
Constructor from a stroke and eventually a fill color, and two optional parameters.
| colors | list of colors (stroke color and eventually fill color) |
| param1 | Optional parameter, can be layer name or line style |
| param2 | Optional parameter, can be layer name or line style |
| param3 | Optional parameter, can be layer name or line style |
| void codac2::StyleProperties::parse_parameter | ( | const std::string & | param | ) |
Parse a parameter and update the style properties accordingly.
| param | Parameter to parse, can be a line style, line width or layer name |