MCPcopy Index your code
hub / github.com/clips/pattern / render

Function render

pattern/canvas.js:3038–3045  ·  view source on GitHub ↗
(callback, width, height)

Source from the content-addressed store, hash-verified

3036});
3037
3038function render(callback, width, height) {
3039 /* Returns an Image object from a function containing drawing commands (i.e. a procedural image).
3040 * This is useful when, for example, you need to render filters on paths.
3041 */
3042 var buffer = new OffscreenBuffer(width, height);
3043 buffer.draw = callback;
3044 return buffer.render();
3045}
3046
3047function filter(img, callback) {
3048 /* Returns a new Image object with the given pixel function applied to it.

Callers 2

solidFunction · 0.70
transparentFunction · 0.70

Calls 1

renderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…