forked from floft/sprouts
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtext.h
30 lines (25 loc) · 831 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
#ifndef TEXT_H_INCLUDED
#define TEXT_H_INCLUDED
#include "generate.h"
#include <cwchar>
#include <string>
/**************
*Description:
*Input:
*Output:
**************/
using namespace std;
namespace Text
{
struct TextProperties
{
float tabWidth = 8;
};
extern const TextProperties defaultTextProperties;
float width(wstring str, const TextProperties & properties = defaultTextProperties);
float height(wstring str, const TextProperties & properties = defaultTextProperties);
float xPos(wstring str, const TextProperties & properties = defaultTextProperties);
float yPos(wstring str, const TextProperties & properties = defaultTextProperties);
Mesh mesh(wstring str, Color color = Color(1), const TextProperties & properties = defaultTextProperties);
}
#endif // TEXT_H_INCLUDED