simple-draw/src/Shapes.hpp

32 lines
702 B
C++

//
// Created by shaohuatong on 06.12.19.
//
#ifndef SIMPLE_DRAW_SHAPES_HPP
#define SIMPLE_DRAW_SHAPES_HPP
#include "vkvm.hpp"
#include "internal.hpp"
class Shapes {
public:
void addShape(std::vector<std::vector<bool>> shape, int startX,
int startY, int endX, int endY);
bool containsPixel(int x, int y);
int getCount();
std::vector<std::vector<bool>> getShape(int index);
int getStartX(int index);
int getStartY(int index);
private:
int count = 0;
std::vector<int> startXs;
std::vector<int> startYs;
std::vector<int> endXs;
std::vector<int> endYs;
std::vector<std::vector<std::vector<bool>>> shapes;
};
#endif //SIMPLE_DRAW_SHAPES_HPP