
OnCanvas = function(img, color, mode){
	var canvas = CreateSurface(img.width, img.height, color);
	canvas.setBlendMode(mode || BLEND);
	if(img.toString() == "[object image]")
		canvas.blitSurface(img.createSurface(), 0, 0);
	else
		canvas.blitSurface(img, 0, 0);
	return canvas;
}


