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");
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.
void set_g(const std::uint8_t g)
Green.
void set_r(const std::uint8_t r)
Red.
void set_b(const std::uint8_t b)
Blue.
void set_a(const std::uint8_t a)
Alpha.
Colour m_colour
Used by all primitives.