blob: 84b4e2077e301113efa57f5e7d6750360b5b597a [file] [log] [blame]
function CVShapeElement(data,globalData){
this.shapes = [];
this.parent.constructor.call(this,data,globalData);
}
createElement(CVBaseElement, CVShapeElement);
CVShapeElement.prototype.createElements = function(){
this.parent.createElements.call(this);
this.mainShape = new CVShapeItemElement(this.data.shapes,true,this.globalData);
};
CVShapeElement.prototype.prepareFrame = function(num){
var renderParent = this.parent.prepareFrame.call(this,num);
if(renderParent===false){
return;
}
this.mainShape.prepareFrame(num);
};
CVShapeElement.prototype.draw = function(parentMatrix){
if(this.parent.draw.call(this, parentMatrix)===false){
return;
}
this.drawShapes(this.finalTransform);
if(this.data.hasMask){
this.globalData.renderer.restore(true);
}
};
CVShapeElement.prototype.drawShapes = function(parentTransform){
this.mainShape.renderShape(parentTransform);
};
CVShapeElement.prototype.destroy = function(){
this.mainShape.destroy();
this.parent.destroy.call();
};