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

Function PiuGIFImageDictionary

modules/piu/MC/gif/piuGIFImage.c:107–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void PiuGIFImageDictionary(xsMachine* the, void* it)
108{
109 PiuGIFImage* self = it;
110 if (xsFindResult(xsArg(1), xsID_path)) {
111 xsSlot* path = PiuString(xsResult);
112 (*self)->path = path;
113 }
114 else if (xsFindResult(xsArg(1), xsID_buffer)) {
115 xsSlot* buffer = xsToReference(xsResult);
116 (*self)->buffer = buffer;
117 }
118 if (xsFindResult(xsArg(1), xsID_flip)) {
119 xsSlot* flip = PiuString(xsResult);
120 (*self)->flip = flip;
121 }
122 if (xsFindResult(xsArg(1), xsID_color)) {
123 PiuColorRecord color;
124 PiuColorDictionary(the, &xsResult, &color);
125 (*self)->color = color;
126 (*self)->flags |= piuColorized;
127 }
128}
129
130void PiuGIFImageDraw(void* it, PiuView* view, PiuRectangle area)
131{

Callers 1

PiuGIFImage_createFunction · 0.85

Calls 1

PiuColorDictionaryFunction · 0.85

Tested by

no test coverage detected