1 #include "canvas-flag.h"
5 using namespace Gnome::Canvas;
10 CanvasFlag::set_text(string a_text)
16 _text = new Text(*this, 0.0, 0.0, a_text);
17 _text->property_justification() = Gtk::JUSTIFY_CENTER;
18 _text->property_fill_color_rgba() = _outline_color_rgba;
19 double flagwidth = _text->property_text_width() + 10.0;
20 double flagheight = _text->property_text_height() + 3.0;
21 _text->property_x() = flagwidth / 2.0;
22 _text->property_y() = flagheight / 2.0;
24 _line = new SimpleLine(*this, 0.0, 0.0, 0.0, _height);
25 _line->property_color_rgba() = _outline_color_rgba;
26 _rect = new SimpleRect(*this, 0.0, 0.0, flagwidth, flagheight);
27 _rect->property_outline_color_rgba() = _outline_color_rgba;
28 _rect->property_fill_color_rgba() = _fill_color_rgba;
29 _text->lower_to_bottom();
33 CanvasFlag::~CanvasFlag()