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");
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.
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.
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.