masking multiple dynamic images in kineticjs using setClipFunc -


i'm trying add simple rectangular mask cover multiple images, container method 'setclipfunc' looks winner http://kineticjs.com/docs/symbols/kinetic.container.php#setclipfunc confused how works , why being passed number 'deg' (presumably degrees?). if has working example of 'setclipfunc' in action i'd grateful!

        layer.setclipfunc(function (deg) {          var context = deg.context;         context.beginpath();         context.moveto(5, 5);         context.lineto(34, 202);          context.lineto(2, 405);         context.lineto(212, 385);         context.lineto(425, 405);         context.lineto(400, 202);         context.lineto(415, 10);         context.lineto(212, 25);         context.closepath();     });     layer.draw(); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -