-
Notifications
You must be signed in to change notification settings - Fork 1
/
text.h
32 lines (29 loc) · 901 Bytes
/
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
#ifndef TEXT_H
#define TEXT_H
#include "v4l2_wayland.h"
#include "vwdrawable.h"
#include "vwcolor.h"
class Text : public vwDrawable
{
public:
Text();
~Text() {}
void create(char *text, char *font, DingleDots *dd);
void free();
bool render(std::vector<cairo_t *> &contexts);
void set_color_red(double r) { set_color(R, r); }
void set_color_green(double g) { set_color(G, g); }
void set_color_blue(double b) { set_color(B, b); }
void set_color_alpha(double a) { set_color(A, a); }
void set_color_hue(double h) { set_color(H, h); }
void set_color_saturation(double s) { set_color(S, s); }
void set_color_value(double v) { set_color(V, v); }
void set_color_rgba(double r, double g, double v, double a);
void set_color_hsva(double h, double s, double v, double a);
void set_color(color_prop p, double v);
private:
std::string text;
std::string font;
vwColor color;
};
#endif // TEXT_H