Add cairo interface.
This commit is contained in:
parent
a03eb9599f
commit
9bcc0ae88e
63 changed files with 1247 additions and 450 deletions
37
src/visual_elements/TextElement.h
Normal file
37
src/visual_elements/TextElement.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#pragma once
|
||||
|
||||
#include "DiscretePoint.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class Color;
|
||||
|
||||
class TextElement
|
||||
{
|
||||
std::string mContent;
|
||||
DiscretePoint mLocation;
|
||||
std::string mFontLabel;
|
||||
std::unique_ptr<Color> mFillColor;
|
||||
std::unique_ptr<Color> mStrokeColor;
|
||||
|
||||
public:
|
||||
|
||||
TextElement(const std::string& content, const DiscretePoint& loc);
|
||||
|
||||
~TextElement();
|
||||
|
||||
static std::unique_ptr<TextElement> Create(const std::string& content, const DiscretePoint& loc);
|
||||
|
||||
Color* GetFillColor() const;
|
||||
Color* GetStrokeColor() const;
|
||||
|
||||
DiscretePoint GetLocation() const;
|
||||
std::string GetContent() const;
|
||||
std::string GetFontLabel() const;
|
||||
void SetContent(const std::string& content);
|
||||
void SetFillColor(std::unique_ptr<Color> color);
|
||||
void SetStrokeColor(std::unique_ptr<Color> color);
|
||||
};
|
||||
|
||||
using TextElementUPtr = std::unique_ptr<TextElement>;
|
Loading…
Add table
Add a link
Reference in a new issue