add mask
This commit is contained in:
parent
4447cd67d1
commit
5b32c517c1
12 changed files with 179 additions and 16 deletions
20
src/mask.h
Normal file
20
src/mask.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue