1 #ifndef _RIVE_DRAWABLE_BASE_HPP_
2 #define _RIVE_DRAWABLE_BASE_HPP_
3 #include "core/field_types/core_uint_type.hpp"
7 class DrawableBase : public Node
13 static const int typeKey = 13;
15 /// Helper to quickly determine if a core object extends another without
17 bool isTypeOf(int typeKey) const override
21 case DrawableBase::typeKey:
22 case NodeBase::typeKey:
23 case TransformComponentBase::typeKey:
24 case ContainerComponentBase::typeKey:
25 case ComponentBase::typeKey:
32 int coreType() const override { return typeKey; }
34 static const int blendModeValuePropertyKey = 23;
37 int m_BlendModeValue = 3;
39 inline int blendModeValue() const { return m_BlendModeValue; }
40 void blendModeValue(int value)
42 if (m_BlendModeValue == value)
46 m_BlendModeValue = value;
47 blendModeValueChanged();
50 bool deserialize(int propertyKey, BinaryReader& reader) override
54 case blendModeValuePropertyKey:
55 m_BlendModeValue = CoreUintType::deserialize(reader);
58 return Node::deserialize(propertyKey, reader);
62 virtual void blendModeValueChanged() {}