simple-draw/src/Rectangle.hpp

35 lines
773 B
C++

//
// Created by shaohuatong on 06.12.19.
//
#ifndef SIMPLE_DRAW_RECTANGLE_HPP
#define SIMPLE_DRAW_RECTANGLE_HPP
#include "internal.hpp"
#include "vkvm.hpp"
#include "utils.hpp"
class Rectangle {
public:
Rectangle();
Rectangle(vkvm::Coordinates mouseLeftDownPosition, vkvm::Coordinates mousePosition, int penWidth);
std::vector<std::vector<bool>> getRectangle();
int getLength();
int getWidth();
vkvm::Coordinates getUperLeft();
vkvm::Coordinates getBottomRight();
private:
int length;
int width;
vkvm::Coordinates uperLeft;
vkvm::Coordinates bottomRight;
vkvm::Coordinates mouseLeftDownPosition;
vkvm::Coordinates mousePosition;
std::vector<std::vector<bool>> rectangle;
};
#endif //SIMPLE_DRAW_RECTANGLE_HPP