(img, alpha)
| 3196 | } |
| 3197 | |
| 3198 | function transparent(img, alpha) { |
| 3199 | /* Returns a transparent version of the image. |
| 3200 | */ |
| 3201 | return render(function(canvas) { |
| 3202 | image(img, {alpha: alpha}); |
| 3203 | }, img.width, img.height); |
| 3204 | } |
| 3205 | |
| 3206 | function mask(img1, img2, dx, dy, alpha) { |
| 3207 | /* Applies the second image as an alpha mask to the first image. |