MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuColorsDictionary

Function PiuColorsDictionary

modules/piu/All/piuColor.c:158–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158void PiuColorsDictionary(xsMachine *the, xsSlot* slot, PiuColor colors)
159{
160 if (xsIsInstanceOf(*slot, xsArrayPrototype)) {
161 xsIntegerValue i, c = xsToInteger(xsGet(*slot, xsID_length));
162 if (c > 4) c = 4;
163 for (i = 0; i < c; i++) {
164 xsVar(0) = xsGetAt(*slot, xsInteger(i));
165 PiuColorDictionary(the, &xsVar(0), &colors[i]);
166 }
167 }
168 else {
169 PiuColorRecord color;
170 PiuColorDictionary(the, slot, &color);
171 colors[0] = color;
172 colors[1] = color;
173 colors[2] = color;
174 colors[3] = color;
175 }
176}
177
178void PiuColorsSerialize(xsMachine *the, PiuColor colors)
179{

Callers 2

PiuSkinCreateFunction · 0.85
PiuStyleCreateFunction · 0.85

Calls 1

PiuColorDictionaryFunction · 0.85

Tested by

no test coverage detected