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

Function image

pattern/canvas.js:2274–2283  ·  view source on GitHub ↗
(img, x, y, options)

Source from the content-addressed store, hash-verified

2272});
2273
2274function image(img, x, y, options) {
2275 /* Draws the image at (x,y), scaling it to the given width and height.
2276 * The image's transparency can be set with alpha (0.0-1.0).
2277 */
2278 img = (img instanceof Image)? img : new Image(img);
2279 if (!options || options.draw != false) {
2280 img.draw(x, y, options);
2281 }
2282 return img;
2283}
2284
2285function imagesize(img) {
2286 /* Returns an array [width, height] with the image dimensions.

Callers 1

transparentFunction · 0.85

Calls 1

drawMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…