#pragma once #include "Box.hpp" #include "Point.hpp" #include "RGB.hpp" #include #include namespace Raven { enum class PaintTextAlign { Center = 0, Left }; class Painter { private: Cairo::RefPtr m_cairo; PangoFontDescription *m_pango_font_description; public: Painter() {} Cairo::RefPtr get_cairo() { return m_cairo; } void set_cairo(Cairo::RefPtr cairo) { m_cairo = cairo; } void set_pango_font_description(PangoFontDescription *pango_font_description) { m_pango_font_description = pango_font_description; } PangoFontDescription *get_pango_font_description() { return m_pango_font_description; } void rounded_rectangle(Box &geometry, double border_radius); bool text(Point &where, std::string &text); bool text(Box &geometry, std::string &text, PaintTextAlign align); void source_rgb(RGB &source_rgb); void fill(); }; }