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

Function offscreen

examples/commodetto/docs/main.js:125–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124
125function offscreen() {
126 let offscreen = new BufferOut({width: 30, height: 30, pixelFormat: poco.pixelsOut.pixelFormat});
127 let pocoOff = new Poco(offscreen);
128 pocoOff.begin();
129 pocoOff.fillRectangle(gray, 0, 0, 30, 30);
130 pocoOff.fillRectangle(red, 2, 2, 26, 26);
131 pocoOff.fillRectangle(black, 4, 4, 22, 22);
132 pocoOff.fillRectangle(blue, 6, 6, 18, 18);
133 pocoOff.fillRectangle(white, 8, 8, 14, 14);
134 pocoOff.fillRectangle(green, 10, 10, 10, 10);
135 pocoOff.fillRectangle(gray, 13, 13, 4, 4);
136 pocoOff.end();
137
138 poco.fillPattern(offscreen.bitmap, 0, 0, poco.width, poco.height);
139}
140
141function alpha() {
142 poco.fillRectangle(gray, 0, 0, poco.width, poco.height);

Callers

nothing calls this directly

Calls 4

beginMethod · 0.95
fillRectangleMethod · 0.95
endMethod · 0.95
fillPatternMethod · 0.80

Tested by

no test coverage detected