23 lines
374 B
C++
23 lines
374 B
C++
#pragma once
|
|
|
|
#include <psemek/ui/shape.hpp>
|
|
|
|
namespace psemek::ui
|
|
{
|
|
|
|
struct box_shape
|
|
: shape
|
|
{
|
|
geom::box<float, 2> box{{{0.f, 0.f}, {0.f, 0.f}}};
|
|
|
|
box_shape() = default;
|
|
|
|
box_shape(geom::box<float, 2> box)
|
|
: box{box}
|
|
{}
|
|
|
|
bool contains(geom::point<float, 2> const & point) const override;
|
|
geom::box<float, 2> bbox() const override { return box; }
|
|
};
|
|
|
|
}
|