forked from Hexagenic/wanikaniwallpaper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
renderer.hpp
39 lines (34 loc) · 928 Bytes
/
renderer.hpp
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
36
37
38
#pragma once
#include <stdint.h>
#include <string>
#include <ft2build.h>
#include FT_FREETYPE_H
#include "order.hpp"
#include "color.hpp"
namespace wanikani
{
class Renderer
{
public:
Renderer(int width, int height, std::string fontName);
void setMargins(int left, int right, int top, int bottom);
void render(Order &order);
void save(std::string fileName);
void setBackground(Color color);
void setUnseen(Color color);
void setApprentice(Color color);
void setGuru(Color color);
void setMaster(Color color);
void setEnlightened(Color color);
void setBurned(Color color);
void setError(Color color);
Color SRSColor(WaniKaniSRS srs);
private:
FT_Library library_;
FT_Face face_;
int width_, height_;
int marginLeft_, marginRight_, marginTop_, marginBottom_;
Color colorBackground_, colorUnseen_, colorApprentice_, colorGuru_, colorMaster_, colorEnlightened_, colorBurned_, colorError_;
int *buffer_;
};
}