#include <SlotManager.h>
Definition at line 40 of file SlotManager.h.
◆ SlotID
◆ SlotManager()
Definition at line 49 of file SlotManager.cpp.
50 : fRevalidator(std::move(revalidator)) {}
◆ ~SlotManager()
skottie::SlotManager::~SlotManager |
( |
| ) |
|
|
overridedefault |
◆ getColorSlot()
std::optional< SkColor > skottie::SlotManager::getColorSlot |
( |
const SlotID & |
slotID | ) |
const |
Definition at line 120 of file SlotManager.cpp.
120 {
121 const auto valueGroup = fColorMap.find(slotID);
122 return valueGroup && !valueGroup->empty() ? std::optional<SkColor>(*(valueGroup->at(0).value))
124}
◆ getImageSlot()
Definition at line 126 of file SlotManager.cpp.
127 {
128 const auto imageGroup = fImageMap.find(slotID);
129 return imageGroup && !imageGroup->empty() ? imageGroup->at(0)->getImageAsset() : nullptr;
130}
◆ getScalarSlot()
std::optional< float > skottie::SlotManager::getScalarSlot |
( |
const SlotID & |
slotID | ) |
const |
Definition at line 132 of file SlotManager.cpp.
132 {
133 const auto valueGroup = fScalarMap.find(slotID);
134 return valueGroup && !valueGroup->empty() ? std::optional<float>(*(valueGroup->at(0).value))
136}
◆ getSlotInfo()
Definition at line 180 of file SlotManager.cpp.
180 {
181 SlotInfo sInfo;
182 for (const auto& c : fColorMap) {
183 sInfo.fColorSlotIDs.push_back(c.first);
184 }
185 for (
const auto&
s : fScalarMap) {
186 sInfo.fScalarSlotIDs.push_back(
s.first);
187 }
188 for (const auto& v : fVec2Map) {
189 sInfo.fVec2SlotIDs.push_back(v.first);
190 }
191 for (
const auto&
i : fImageMap) {
192 sInfo.fImageSlotIDs.push_back(
i.first);
193 }
194 for (const auto& t : fTextMap) {
195 sInfo.fTextSlotIDs.push_back(t.first);
196 }
197 return sInfo;
198}
◆ getTextSlot()
Definition at line 144 of file SlotManager.cpp.
145 {
146 const auto adapterGroup = fTextMap.find(slotID);
147 return adapterGroup && !adapterGroup->empty() ?
148 std::optional<TextPropertyValue>(adapterGroup->at(0)->getText()) :
150}
◆ getVec2Slot()
std::optional< SkV2 > skottie::SlotManager::getVec2Slot |
( |
const SlotID & |
slotID | ) |
const |
Definition at line 138 of file SlotManager.cpp.
138 {
139 const auto valueGroup = fVec2Map.find(slotID);
140 return valueGroup && !valueGroup->empty() ? std::optional<SkV2>(*(valueGroup->at(0).value))
142}
◆ setColorSlot()
bool skottie::SlotManager::setColorSlot |
( |
const SlotID & |
slotID, |
|
|
SkColor |
c |
|
) |
| |
Definition at line 54 of file SlotManager.cpp.
54 {
55 auto c4f = SkColor4f::FromColor(c);
56 ColorValue v{c4f.fR, c4f.fG, c4f.fB, c4f.fA};
57 const auto valueGroup = fColorMap.find(slotID);
58 if (valueGroup) {
59 for (auto& cPair : *valueGroup) {
60 *(cPair.value) = v;
61 cPair.adapter->onSync();
62 }
64 return true;
65 }
66 return false;
67}
◆ setImageSlot()
Definition at line 69 of file SlotManager.cpp.
70 {
71 const auto imageGroup = fImageMap.find(slotID);
72 if (imageGroup) {
73 for (auto& imageAsset : *imageGroup) {
74 imageAsset->setImageAsset(
i);
75 }
77 return true;
78 }
79 return false;
80}
◆ setScalarSlot()
bool skottie::SlotManager::setScalarSlot |
( |
const SlotID & |
slotID, |
|
|
float |
s |
|
) |
| |
Definition at line 82 of file SlotManager.cpp.
82 {
83 const auto valueGroup = fScalarMap.find(slotID);
84 if (valueGroup) {
85 for (auto& sPair : *valueGroup) {
87 sPair.adapter->onSync();
88 }
90 return true;
91 }
92 return false;
93}
◆ setTextSlot()
Definition at line 108 of file SlotManager.cpp.
108 {
109 const auto adapterGroup = fTextMap.find(slotID);
110 if (adapterGroup) {
111 for (auto& textAdapter : *adapterGroup) {
112 textAdapter->setText(t);
113 }
115 return true;
116 }
117 return false;
118}
◆ setVec2Slot()
bool skottie::SlotManager::setVec2Slot |
( |
const SlotID & |
slotID, |
|
|
SkV2 |
v |
|
) |
| |
Definition at line 95 of file SlotManager.cpp.
95 {
96 const auto valueGroup = fVec2Map.find(slotID);
97 if (valueGroup) {
98 for (auto& vPair : *valueGroup) {
99 *(vPair.value) = v;
100 vPair.adapter->onSync();
101 }
103 return true;
104 }
105 return false;
106}
◆ skottie::internal::AnimatablePropertyContainer
◆ skottie::internal::AnimationBuilder
The documentation for this class was generated from the following files: