1 #ifndef _RIVE_POINTS_PATH_BASE_HPP_
2 #define _RIVE_POINTS_PATH_BASE_HPP_
3 #include "core/field_types/core_bool_type.hpp"
4 #include "shapes/path.hpp"
7 class PointsPathBase : public Path
13 static const uint16_t typeKey = 16;
15 /// Helper to quickly determine if a core object extends another without
17 bool isTypeOf(uint16_t typeKey) const override
21 case PointsPathBase::typeKey:
22 case PathBase::typeKey:
23 case NodeBase::typeKey:
24 case TransformComponentBase::typeKey:
25 case ContainerComponentBase::typeKey:
26 case ComponentBase::typeKey:
33 uint16_t coreType() const override { return typeKey; }
35 static const uint16_t isClosedPropertyKey = 32;
38 bool m_IsClosed = false;
40 inline bool isClosed() const { return m_IsClosed; }
41 void isClosed(bool value)
43 if (m_IsClosed == value)
51 Core* clone() const override;
52 void copy(const PointsPathBase& object)
54 m_IsClosed = object.m_IsClosed;
58 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
62 case isClosedPropertyKey:
63 m_IsClosed = CoreBoolType::deserialize(reader);
66 return Path::deserialize(propertyKey, reader);
70 virtual void isClosedChanged() {}