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

Function PiuPort_invalidate

modules/piu/All/piuPort.c:338–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338void PiuPort_invalidate(xsMachine* the)
339{
340 xsIntegerValue c = xsToInteger(xsArgc);
341 PiuPort* self = PIU(Port, xsThis);
342 PiuView* view = (*self)->view;
343 if (view) xsUnknownError("out of sequence");
344 if (c >= 4) {
345 PiuRectangleRecord area;
346 PiuCoordinate x = xsToPiuCoordinate(xsArg(0));
347 PiuCoordinate y = xsToPiuCoordinate(xsArg(1));
348 PiuDimension w = xsToPiuDimension(xsArg(2));
349 PiuDimension h = xsToPiuDimension(xsArg(3));
350 PiuRectangleSet(&area, x, y, w, h);
351 PiuContentInvalidate(self, &area);
352 }
353 else
354 PiuContentInvalidate(self, NULL);
355}
356
357void PiuPort_popClip(xsMachine* the)
358{

Callers

nothing calls this directly

Calls 2

PiuRectangleSetFunction · 0.85
PiuContentInvalidateFunction · 0.85

Tested by

no test coverage detected