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

Method begin

tools/testmc/commodettoChecksumOut.js:36–47  ·  view source on GitHub ↗
(x, y, width, height)

Source from the content-addressed store, hash-verified

34 Object.defineProperty(this, "pixelFormat", {value: options.pixelFormat ?? Bitmap.RGB565LE});
35 }
36 begin(x, y, width, height) {
37 if ("object" === typeof x)
38 ({x, y, width, height} = x);
39
40 this.#show?.begin(x, y, width, height);
41
42 if (!this.#continue)
43 this.#digest.reset();
44 this.#continue = false;
45
46 this.#digest.write(Int32Array.of(x, y, width, height).buffer);
47 }
48 send(pixels, offset, byteLength) {
49 this.#show?.send(pixels, offset, byteLength);
50

Callers

nothing calls this directly

Calls 3

beginMethod · 0.65
writeMethod · 0.65
resetMethod · 0.45

Tested by

no test coverage detected