meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation
http://camanjs.com
BSD 3-Clause "New" or "Revised" License
3.55k stars 404 forks source link

change position and size of overlayImage #86

Open mateusk opened 11 years ago

mateusk commented 11 years ago

i was able to apply a series of images with blending modes in a canvas using camanJS, but i would like to control their position and size individually. something like:

var imgSrc = imgArraySrc[0]; Caman("#drawingCanvas", imgSrc, function () { for (var i = 1; i < imgArraySrc.lenght; i++){ var blendImgSrc = imgArraySrc[i]; this.newLayer(function () { this.setBlendingMode(blendingMode); this.overlayImage(blendImgSrc); this.width = imgWidth;
this.height = imgHeight; this.x = 20; this.y = 20; }); } this.render();
});

another question i would have is how could i access these layers added to the stack later on, to change their properties like blending mode, etc.

thanks, nice library by the way!

meltingice commented 11 years ago

Overlay images need a lot of work. Right now they are quite basic. Marking this as a todo item.