blob: 857815fd887d4e8f23255e48df2f5e355157e893 (
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
|
#pragma once
#include "Color.h"
#include "Point.h"
#include "Rect.h"
#include <AK/String.h>
class Font;
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());
const Font& font() const;
private:
Widget& m_widget;
Font& m_font;
};
|