2021-12-29 15:59:18 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "core/area.h"
|
|
|
|
#include "core/color.h"
|
|
|
|
|
|
|
|
namespace kku
|
|
|
|
{
|
|
|
|
|
|
|
|
class Rectangle
|
|
|
|
{
|
2022-10-18 04:59:51 +02:00
|
|
|
public:
|
2021-12-29 15:59:18 +01:00
|
|
|
virtual ~Rectangle() = default;
|
2022-10-18 04:59:51 +02:00
|
|
|
virtual void setRect(const Area<float> &rect) = 0;
|
2021-12-29 15:59:18 +01:00
|
|
|
virtual Area<float> getRect() const = 0;
|
|
|
|
|
2022-10-18 04:59:51 +02:00
|
|
|
virtual void setPosition(const Point &position) = 0;
|
2021-12-29 15:59:18 +01:00
|
|
|
virtual Point getPosition() const = 0;
|
2022-10-18 04:59:51 +02:00
|
|
|
virtual void move(const kku::Vector2<float> &delta) = 0;
|
2021-12-29 15:59:18 +01:00
|
|
|
|
2022-10-18 04:59:51 +02:00
|
|
|
virtual void setColor(const Color &color) = 0;
|
2022-02-06 02:33:09 +01:00
|
|
|
virtual kku::Color getColor() const = 0;
|
2022-10-18 04:59:51 +02:00
|
|
|
virtual bool contains(const kku::Point &position) const = 0;
|
2021-12-29 15:59:18 +01:00
|
|
|
|
|
|
|
virtual void display() = 0;
|
|
|
|
};
|
|
|
|
|
2022-10-18 04:59:51 +02:00
|
|
|
} // namespace kku
|