/*ImageManager.loadBitmap = function(folder, filename, hue, smooth) {    if (filename) {        var path = folder + encodeURIComponent(filename) + '.png';        var bitmap = this.loadNormalBitmap(path, hue || 0);        //console.log("disabling smoothing for "+path);		bitmap.smooth = false;        return bitmap;    } else {        return this.loadEmptyBitmap();    }};
PIXI.scaleModes.DEFAULT = PIXI.scaleModes.NEAREST;
*/
Graphics._centerElement = function(element) {
    var width = element.width * this._realScale;
    var height = element.height * this._realScale;
    element.style.position = 'absolute';
    element.style.margin = 'auto';
    element.style.top = 0;
    element.style.left = 0;
    element.style.right = 0;
    element.style.bottom = 0;
    element.style.width = width + 'px';
    element.style.height = height + 'px';
    element.style["image-rendering"] = "pixelated"; 
    element.style["font-smooth"] = "none";
};