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

Method begin

modules/commodetto/commodettoRLE4Out.js:49–58  ·  view source on GitHub ↗
(x, y, width, height)

Source from the content-addressed store, hash-verified

47 throw new Error("requires Gray16 pixels");
48 }
49 begin(x, y, width, height) {
50 // buffer for expanded scanline
51 width = (width + 1) & ~1;
52 this.scan = new Uint8Array(width);
53
54 // buffer to hold worst-case encoded image
55 this.output = new Uint8Array(width * (height + (height >> 2)));
56 this.output.position = 0;
57 this.output.firstNybble = true;
58 }
59 send(pixels, offsetIn = 0, count = pixels.byteLength - offsetIn) {
60 let width = this.width;
61 let halfWidth = (width + 1) >> 1;

Callers 2

runMethod · 0.95
runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected