#include <canvas_private.hpp>
Public Member Functions | |
rectangle_shape (const config &cfg) | |
Constructor. More... | |
void | draw (wfl::map_formula_callable &variables) override |
Draws the canvas. More... | |
Public Member Functions inherited from gui2::canvas::shape | |
shape (const config &cfg) | |
virtual | ~shape () |
bool | immutable () const |
Private Attributes | |
int | border_thickness_ |
Border thickness. More... | |
typed_formula< color_t > | border_color_ |
The border color of the rectangle. More... | |
typed_formula< color_t > | fill_color_ |
The border color of the rectangle. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from gui2::rect_bounded_shape | |
rect_bounded_shape (const config &cfg) | |
Constructor. More... | |
Protected Attributes inherited from gui2::rect_bounded_shape | |
typed_formula< int > | x_ |
The x coordinate of the rectangle. More... | |
typed_formula< int > | y_ |
The y coordinate of the rectangle. More... | |
typed_formula< int > | w_ |
The width of the rectangle. More... | |
typed_formula< int > | h_ |
The height of the rectangle. More... | |
Definition at line 76 of file canvas_private.hpp.
|
explicit |
Constructor.
cfg | The config object to define the rectangle. |
Definition at line 88 of file canvas.cpp.
References border_color_, border_thickness_, DBG_GUI_P, debug, and gui2::typed_formula< T >::has_formula().
|
overridevirtual |
Draws the canvas.
variables | The canvas can have formulas in it's definition, this parameter contains the values for these formulas. |
Implements gui2::canvas::shape.
Definition at line 105 of file canvas.cpp.
References border_color_, border_thickness_, DBG_GUI_D, draw::fill(), fill_color_, gui2::rect_bounded_shape::h_, i, color_t::null(), draw::rect(), draw::set_color(), gui2::rect_bounded_shape::w_, gui2::rect_bounded_shape::x_, and gui2::rect_bounded_shape::y_.
|
private |
The border color of the rectangle.
If the color is fully transparent the border isn't drawn.
Definition at line 101 of file canvas_private.hpp.
Referenced by draw(), and rectangle_shape().
|
private |
Border thickness.
If 0 the fill color is used for the entire widget.
Definition at line 94 of file canvas_private.hpp.
Referenced by draw(), and rectangle_shape().
|
private |
The border color of the rectangle.
If the color is fully transparent the rectangle won't be filled.
Definition at line 108 of file canvas_private.hpp.
Referenced by draw().