Tuesday, 15 January 2013

javascript - view areas with canvas and createjs/easeljs -



javascript - view areas with canvas and createjs/easeljs -

i working createjs , whole programme working on within canvas element. within element have few (5-6 areas) elements within it, should go outside , should cut. have made image explains situation. yellowish part program. reddish border area, elements within should not go outside (i set image in it, cut)

do have thought how can that?

as mentioned marton masked container. here code:

var container = new createjs.container(); var maskshape = new craetejs.shape(); maskshape.graphics.drawrect(50, 50, 200, 200); // x, y, width, height container.mask = maskshape;

javascript canvas easeljs createjs

No comments:

Post a Comment