ScaledElement = function ScaledElement(element, width, height, scaleFont) {

        /**
         * The width of this ScaledElement, in arbitrary units, relative to
         * other ScaledElements.
         *
         * @type {Number}
         */
         this.width = width;

        /**
         * The height of this ScaledElement, in arbitrary units, relative to
         * other ScaledElements.
         *
         * @type {Number}
         */
         this.height = height;
 
        /**
         * Resizes the associated element, updating its dimensions according to
         * the given pixels per unit.
         *
         * @param {Number} pixels
         *     The number of pixels to assign per arbitrary unit.
         */
        this.scale = function(pixels) {

            // Scale element width/height
            element.style.width  = (width  * pixels) + "px";
            element.style.height = (height * pixels) + "px";

            // Scale font, if requested
            if (scaleFont) {
                element.style.lineHeight = (height * pixels) + "px";
                element.style.fontSize   = pixels + "px";
            }

        };

    }
An element whose dimensions are maintained according to an arbitrary
scale. The conversion factor for these arbitrary units to pixels is
provided later via a call to scale().

@private
@constructor
@param {Element} element
    The element whose scale should be maintained.

@param {Number} width
    The width of the element, in arbitrary units, relative to other
    ScaledElements.

@param {Number} height
    The height of the element, in arbitrary units, relative to other
    ScaledElements.
    
@param {Boolean} [scaleFont=false]
    Whether the line height and font size should be scaled as well.