aboutsummaryrefslogtreecommitdiff
path: root/include/mglpp/graphics/Text.hpp
blob: d1269945613ac33f33aa5324a6638351cc11a876 (plain)
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
#ifndef MGLPP_TEXT_HPP
#define MGLPP_TEXT_HPP

#include "Drawable.hpp"

extern "C" {
#include <mgl/graphics/text.h>
}

namespace mgl {
    class Font;
    class Text : public Drawable {
    public:
        Text(const char *str, vec2f position, Font &font);
        ~Text();

        void set_position(vec2f position) override;
        void set_color(Color color) override;
    protected:
        void draw(Window &window) override;
    private:
        mgl_text text;
        Font &font;
    };
}

#endif /* MGLPP_TEXT_HPP */