Dawn/src/dawn/scene/item/display/Rectangle.hpp

30 lines
745 B
C++

// Copyright (c) 2024 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "display/Color.hpp"
#include "scene/item/SceneItem2D.hpp"
namespace Dawn {
class Rectangle : public SceneItem2D {
public:
struct Color color = COLOR_WHITE;
float_t width = 32.0f;
float_t height = 32.0f;
/**
* Creates a new Rectangle.
*
* @param parent The parent SceneItem, or nullptr if root (unlikely).
* @param scene The Scene this item belongs to.
*/
Rectangle(std::weak_ptr<SceneItem> parent, std::weak_ptr<Scene> scene);
/**
* Destroys the Rectangle.
*/
virtual ~Rectangle();
};
}