1 #ifndef _RIVE_SHAPE_PAINT_BASE_HPP_
2 #define _RIVE_SHAPE_PAINT_BASE_HPP_
3 #include "container_component.hpp"
4 #include "core/field_types/core_bool_type.hpp"
7 class ShapePaintBase : public ContainerComponent
10 typedef ContainerComponent Super;
13 static const uint16_t typeKey = 21;
15 /// Helper to quickly determine if a core object extends another without
17 bool isTypeOf(uint16_t typeKey) const override
21 case ShapePaintBase::typeKey:
22 case ContainerComponentBase::typeKey:
23 case ComponentBase::typeKey:
30 uint16_t coreType() const override { return typeKey; }
32 static const uint16_t isVisiblePropertyKey = 41;
35 bool m_IsVisible = true;
37 inline bool isVisible() const { return m_IsVisible; }
38 void isVisible(bool value)
40 if (m_IsVisible == value)
48 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
52 case isVisiblePropertyKey:
53 m_IsVisible = CoreBoolType::deserialize(reader);
56 return ContainerComponent::deserialize(propertyKey, reader);
60 virtual void isVisibleChanged() {}