ladybird/Widgets/Painter.h
2018-10-11 23:25:07 +02:00

22 lines
454 B
C++

#pragma once
#include "Color.h"
#include "Point.h"
#include "Rect.h"
#include <AK/String.h>
class Widget;
class Painter {
public:
enum class TextAlignment { TopLeft, Center };
explicit Painter(Widget&);
~Painter();
void fillRect(const Rect&, Color);
void drawRect(const Rect&, Color);
void drawText(const Rect&, const String&, TextAlignment = TextAlignment::TopLeft, const Color& = Color());
private:
Widget& m_widget;
};