-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathText.h
35 lines (28 loc) · 1.05 KB
/
Text.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef TEXT_H
#define TEXT_H
#include "SVGElements.h"
#include <iostream>
class TextSVG : public SVGElements {
private:
float x, y;
float dx, dy;
float font_size;
std::string content;
std::wstring font;
std::string text_anchor;
std::string font_style;
public:
TextSVG(float x, float y, float dx, float dy,
float font_size, const std::string& content, const std::wstring& font, const std::string& text_anchor, const std::string& font_style,
const std::string& fill, float fill_opacity,
const std::string& stroke, float stroke_width, float stroke_opacity,
Transform transform);
void render(Gdiplus::Graphics& graphics, Gdiplus::Matrix& matrix, GradientManager gradients) const override;
std::wstring trimQuotes(const std::wstring& str) const;
std::vector<std::wstring> parseFontFamily(const std::wstring& fontFamily) const;
// Getter v� Setter
float getFontSize() const;
void setFontSize(float value);
void applyFontSize(float font_size);
};
#endif // TEXT_H