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

Function PiuPort_fillTexture

modules/piu/All/piuPort.c:314–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314void PiuPort_fillTexture(xsMachine* the)
315{
316 PiuPort* self = PIU(Port, xsThis);
317 PiuView* view = (*self)->view;
318 PiuTexture* texture;
319 PiuColorRecord color;
320 PiuCoordinate x, y, sx, sy;
321 PiuDimension w, h, sw, sh;
322 if (!view) xsUnknownError("out of sequence");
323 texture = PIU(Texture, xsArg(0));
324 PiuColorDictionary(the, &xsArg(1), &color);
325 x = xsToPiuCoordinate(xsArg(2));
326 y = xsToPiuCoordinate(xsArg(3));
327 w = xsToPiuDimension(xsArg(4));
328 h = xsToPiuDimension(xsArg(5));
329 sx = xsToPiuCoordinate(xsArg(6));
330 sy = xsToPiuCoordinate(xsArg(7));
331 sw = xsToPiuDimension(xsArg(8));
332 sh = xsToPiuDimension(xsArg(9));
333 PiuViewPushColorFilter(view, &color);
334 PiuViewFillTexture(view, texture, x, y, w, h, sx, sy, sw, sh);
335 PiuViewPopColorFilter(view);
336}
337
338void PiuPort_invalidate(xsMachine* the)
339{

Callers

nothing calls this directly

Calls 4

PiuColorDictionaryFunction · 0.85
PiuViewPushColorFilterFunction · 0.50
PiuViewFillTextureFunction · 0.50
PiuViewPopColorFilterFunction · 0.50

Tested by

no test coverage detected