var PlacedSymbol = this.PlacedSymbol = Item.extend({ beans: true, initialize: function() { this.base(); if (arguments[0] instanceof Symbol) { this.symbol = arguments[0]; } else { this.symbol = new Symbol(arguments[0]); } if (arguments.length > 1) { var arg = arguments[1]; if (arg instanceof Matrix) { this.matrix = arguments[2]; } else { var offset = Point.read(arguments, 1); this.matrix = new Matrix().translate(offset); } } else { this.matrix = new Matrix(); } }, _transform: function(matrix, flags) { // In order to set the right context transformation when drawing the // raster, simply preconcatenate the internal matrix with the provided // one. this.matrix.preConcatenate(matrix); }, getBounds: function() { return this.symbol._definition.getStrokeBounds(this.matrix); }, getStrokeBounds: function() { return this.getBounds(); }, draw: function(ctx, param) { // TODO: we need to preserve strokewidth ctx.save(); this.matrix.applyToContext(ctx); Item.draw(this.symbol.getDefinition(), ctx, param); ctx.restore(); } // TODO: // embed() });