This commit is contained in:
Fabien Freling 2022-02-17 23:15:45 +01:00
parent 4447cd67d1
commit 5b32c517c1
12 changed files with 179 additions and 16 deletions

20
src/mask.h Normal file
View file

@ -0,0 +1,20 @@
#pragma once
#include <cstdint>
#include <vector>
namespace freling {
struct Mask {
uint32_t width;
uint32_t height;
std::vector<bool> data; // std::vector is specialized for bool
Mask(uint32_t width, uint32_t height);
void fill(bool b);
void set(int x, int y, bool b);
bool get(int x, int y);
};
} // namespace freling