8#include <nlohmann/json.hpp>
30 this->
m_shape = std::move(e.m_shape);
37 this->
m_shape = std::move(e.m_shape);
49 nlohmann::json json =
"{}"_json;
64 const auto& col = json.at(
"colour");
71 const auto& rad = json.at(
"radii");
72 radii.x = rad.at(
"x");
73 radii.y = rad.at(
"y");
void g(const std::uint8_t g) noexcept
Green.
void a(const std::uint8_t a) noexcept
Alpha.
void r(const std::uint8_t r) noexcept
Red.
void b(const std::uint8_t b) noexcept
Blue.
graphics::Ellipse m_shape
Shape.
virtual ~Ellipse()
Destructor.
Ellipse & operator=(Ellipse &&)
Move assignment operator.
void deserialize(const nlohmann::json &json) override
Deserializes from object.
nlohmann::json serialize() override
Serializes object.
float fragments() const
Get fragments.
const glm::vec2 & radii() const
Get radii.
void create(const float fragments, const glm::vec2 &radii)
Create the ellipse.
Colour m_colour
Used by all primitives.