Image plugin with x/y postion option

I have modified the 'image' plugin to allow x/y positioning of the image.

$.registerLiquidCanvasPlugin({
name: "image",
defaultOpts: { url:"http://www.ruzee.com/files/liquid-canvas-image.png", xPos:0, yPos:0 },
paint: function(area) {
var image = new Image();
image.src = this.opts.url;
image.onload = function() {
area.ctx.drawImage(this, this.opts.xPos, this.opts.yPos);
};
}
});

...you can now use it as such...

image{ url:'path/to/image.png'; xPos:20; yPos:5 }

Trackback URL for this post:

http://www.ruzee.com/trackback/302