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

Function PiuPort_drawSkin

modules/piu/All/piuPort.c:205–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void PiuPort_drawSkin(xsMachine* the)
206{
207 xsIntegerValue c = xsToInteger(xsArgc);
208 PiuPort* self = PIU(Port, xsThis);
209 PiuView* view = (*self)->view;
210 PiuSkin* skin;
211 PiuRectangleRecord bounds;
212 PiuVariant variant;
213 PiuState state;
214 if (!view) xsUnknownError("out of sequence");
215 skin = PIU(Skin, xsArg(0));
216 bounds.x = xsToPiuCoordinate(xsArg(1));
217 bounds.y = xsToPiuCoordinate(xsArg(2));
218 bounds.width = xsToPiuDimension(xsArg(3));
219 bounds.height = xsToPiuDimension(xsArg(4));
220 variant = (c > 5) ? (PiuVariant)xsToInteger(xsArg(5)) : 0;
221 state = (c > 6) ? (PiuState)xsToNumber(xsArg(6)) : 0;
222 PiuSkinDraw(skin, view, &bounds, variant, state, piuCenter, piuMiddle);
223}
224
225void PiuPort_drawString(xsMachine* the)
226{

Callers

nothing calls this directly

Calls 1

PiuSkinDrawFunction · 0.85

Tested by

no test coverage detected