Add ui::null_shape
This commit is contained in:
parent
a3aca66705
commit
ecf69a85e6
2 changed files with 31 additions and 0 deletions
15
libs/ui/include/psemek/ui/null_shape.hpp
Normal file
15
libs/ui/include/psemek/ui/null_shape.hpp
Normal 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;
|
||||
};
|
||||
|
||||
}
|
||||
16
libs/ui/source/null_shape.cpp
Normal file
16
libs/ui/source/null_shape.cpp
Normal 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}}};
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue