27 lines
1013 B
C++
27 lines
1013 B
C++
#pragma once
|
|
|
|
#include "Display/Graphics/Framebuffer.h"
|
|
#include "Display/UI/Text/Fonts.h"
|
|
#include "Display/UI/Text/Font.h"
|
|
#include "Display/Graphics/Color.h"
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
namespace display::ui::text
|
|
{
|
|
|
|
class Renderer
|
|
{
|
|
public:
|
|
void drawText(display::graphics::Framebuffer &fb, int x, int y, const std::string &text, const display::graphics::Color &color = display::graphics::Color{255, 255, 255}, const Font &font = {"LiberationSans-Regular", 12});
|
|
void drawTextOutlined(display::graphics::Framebuffer &fb, int x, int y, const std::string &text, const display::graphics::Color &colorText = display::graphics::Color{255, 255, 255}, const display::graphics::Color &colorOutline = display::graphics::Color{0, 0, 0}, const Font &font = {"LiberationSans-Regular", 12});
|
|
|
|
// int measureWidth(const std::string &text);
|
|
// int measureHeight(const std::string &text);
|
|
|
|
private:
|
|
Fonts fonts;
|
|
};
|
|
|
|
} // namespace display::ui::text
|