Cleaning for mesh addition.
This commit is contained in:
parent
8e0ce22b57
commit
402f381d10
67 changed files with 655 additions and 456 deletions
57
src/visual_elements/TextNode.cpp
Normal file
57
src/visual_elements/TextNode.cpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#include "TextNode.h"
|
||||
|
||||
#include "Color.h"
|
||||
|
||||
TextNode::TextNode(const std::string& content, const DiscretePoint& loc)
|
||||
: AbstractVisualNode(loc),
|
||||
mContent(content),
|
||||
mFontLabel("fixed"),
|
||||
mFillColor(Color(255, 255, 255)),
|
||||
mStrokeColor(Color(0, 0, 0))
|
||||
{
|
||||
// https://en.wikipedia.org/wiki/Fixed_(typeface)#:~:text=misc%2Dfixed%20is%20a%20collection,to%20a%20single%20font%20family.
|
||||
}
|
||||
|
||||
TextNode::~TextNode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::unique_ptr<TextNode> TextNode::Create(const std::string& content, const DiscretePoint& loc)
|
||||
{
|
||||
return std::make_unique<TextNode>(content, loc);
|
||||
}
|
||||
|
||||
const Color& TextNode::getFillColor() const
|
||||
{
|
||||
return mFillColor;
|
||||
}
|
||||
const Color& TextNode::getStrokeColor() const
|
||||
{
|
||||
return mStrokeColor;
|
||||
}
|
||||
|
||||
std::string TextNode::getFontLabel() const
|
||||
{
|
||||
return mFontLabel;
|
||||
}
|
||||
|
||||
std::string TextNode::getContent() const
|
||||
{
|
||||
return mContent;
|
||||
}
|
||||
|
||||
void TextNode::setContent(const std::string& content)
|
||||
{
|
||||
mContent = content;
|
||||
}
|
||||
|
||||
void TextNode::setFillColor(const Color& color)
|
||||
{
|
||||
mFillColor = color;
|
||||
}
|
||||
|
||||
void TextNode::setStrokeColor(const Color& color)
|
||||
{
|
||||
mStrokeColor = color;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue