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

Function render

examples/commodetto/jpeghttp/main.js:37–45  ·  view source on GitHub ↗
(imageData, offset, poco)

Source from the content-addressed store, hash-verified

35}
36
37function render(imageData, offset, poco) {
38 const decoder = new JPEG(imageData);
39 let block;
40 while ((block = decoder.read())) {
41 poco.begin(block.x + offset, block.y+offset, block.width, block.height);
42 poco.drawBitmap(block, block.x+offset, block.y+offset);
43 poco.end();
44 }
45}
46
47async function main() {
48 const poco = new Poco(screen);

Callers 1

mainFunction · 0.70

Calls 4

readMethod · 0.95
drawBitmapMethod · 0.80
beginMethod · 0.65
endMethod · 0.65

Tested by

no test coverage detected