8#include <nlohmann/json.hpp>
30 this->
m_shape = std::move(c.m_shape);
37 this->
m_shape = std::move(c.m_shape);
49 nlohmann::json json =
"{}"_json;
63 const auto& col = json.at(
"colour");
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::Circle m_shape
Shape.
Circle & operator=(Circle &&)
Move assignment operator.
virtual ~Circle()
Destructor.
nlohmann::json serialize() override
Serializes object.
void deserialize(const nlohmann::json &json) override
Deserializes from object.
float radius() const
Get radius.
float fragments() const
Get fragments.
void create(const float fragments, const float radius)
Create the circle.
Colour m_colour
Used by all primitives.