38 lines
518 B
C++
38 lines
518 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <ncurses.h>
|
|
|
|
#include "Size.h"
|
|
#include "Vector2.h"
|
|
|
|
class PaintDevice
|
|
{
|
|
public:
|
|
PaintDevice();
|
|
~PaintDevice();
|
|
|
|
bool ready() const;
|
|
|
|
void resize(const Size& size);
|
|
|
|
void clear();
|
|
|
|
void set_char(
|
|
const Vector2& position,
|
|
wchar_t c
|
|
);
|
|
|
|
wchar_t get_char(
|
|
const Vector2& position
|
|
);
|
|
|
|
void render();
|
|
|
|
private:
|
|
std::vector<std::vector<wchar_t>> m_Buffer;
|
|
|
|
Size m_Size;
|
|
|
|
bool m_Ready = false;
|
|
}; |