Add ui::null_shape

This commit is contained in:
Nikita Lisitsa 2022-02-19 13:00:31 +03:00
parent a3aca66705
commit ecf69a85e6
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#pragma once
#include <psemek/ui/shape.hpp>
namespace psemek::ui
{
struct null_shape
: shape
{
bool contains(geom::point<float, 2> const & point) const override;
geom::box<float, 2> bbox() const override;
};
}

View file

@ -0,0 +1,16 @@
#include <psemek/ui/null_shape.hpp>
namespace psemek::ui
{
bool null_shape::contains(geom::point<float, 2> const &) const
{
return false;
}
geom::box<float, 2> null_shape::bbox() const
{
return geom::box<float, 2>{{{0.f, 0.f}, {0.f, 0.f}}};
}
}