| 8 | using namespace c2d; |
| 9 | |
| 10 | TextIcon::TextIcon(const std::string &str, unsigned int fontSize, Font *font, const Color &color) |
| 11 | : RectangleShape({32, 32}) { |
| 12 | |
| 13 | text = new Text(str, fontSize, font); |
| 14 | text->setOrigin(Origin::Center); |
| 15 | setString(str); |
| 16 | RectangleShape::add(text); |
| 17 | |
| 18 | RectangleShape::setFillColor(Color::Transparent); |
| 19 | RectangleShape::setOutlineColor(color); |
| 20 | RectangleShape::setOutlineThickness(1); |
| 21 | RectangleShape::setCornersRadius(5); |
| 22 | RectangleShape::setCornerPointCount(8); |
| 23 | } |
| 24 | |
| 25 | void TextIcon::setFillColor(const Color &color) { |
| 26 | text->setFillColor(color); |
nothing calls this directly
no outgoing calls
no test coverage detected