(img, x, y, options)
| 2272 | }); |
| 2273 | |
| 2274 | function 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 | |
| 2285 | function imagesize(img) { |
| 2286 | /* Returns an array [width, height] with the image dimensions. |
no test coverage detected
searching dependent graphs…