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

Function PiuSVGImage_center

modules/piu/Pebble/piuSVGImage.c:387–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387void PiuSVGImage_center(xsMachine* the)
388{
389 PiuSVGImage* self = PIU(SVGImage, xsThis);
390 xsIntegerValue c = xsToInteger(xsArgc);
391 (*self)->cx = (c > 0) ? xsToNumber(xsArg(0)) : (xsNumberValue)(*self)->dataWidth / 2.0;
392 (*self)->cy = (c > 1) ? xsToNumber(xsArg(1)) : (xsNumberValue)(*self)->dataHeight / 2.0;
393 (*self)->transforming = 1;
394 PiuSVGImageInvalidate(self, NULL);
395}
396
397void PiuSVGImage_get_cx(xsMachine* the)
398{

Callers

nothing calls this directly

Calls 1

PiuSVGImageInvalidateFunction · 0.85

Tested by

no test coverage detected