/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Base, markType } from "igniteui-react-core/ES2015/type";
import { RectData } from "igniteui-react-core/ES2015/RectData";
import { LabelAppearanceData } from "igniteui-react-core/ES2015/LabelAppearanceData";
import { StringBuilder } from "igniteui-react-core/ES2015/StringBuilder";
/**
 * @hidden
 */
export class ChartTitleVisualData extends Base {
    constructor() {
        super();
        this._viewport = null;
        this._textPlotArea = null;
        this._appearance = null;
        this.appearance = new LabelAppearanceData();
    }
    get width() {
        return this.viewport.width;
    }
    get height() {
        return this.viewport.height;
    }
    get viewport() {
        return this._viewport;
    }
    set viewport(a) {
        this._viewport = a;
    }
    get textPlotArea() {
        return this._textPlotArea;
    }
    set textPlotArea(a) {
        this._textPlotArea = a;
    }
    get appearance() {
        return this._appearance;
    }
    set appearance(a) {
        this._appearance = a;
    }
    serialize() {
        let a = new StringBuilder(0);
        a.u("{");
        a.u("viewport: " + this.viewport.serialize() + ", ");
        a.u("textPlotArea: " + this.textPlotArea.serialize() + ", ");
        a.u("appearance: " + this.appearance.serialize());
        a.u("}");
        return a.toString();
    }
    h(a) {
        let b = (this.textPlotArea.left - a.left) / a.width;
        let c = (this.textPlotArea.top - a.top) / a.height;
        let d = this.textPlotArea.width / a.width;
        let e = this.textPlotArea.height / a.height;
        this.textPlotArea = new RectData(b, c, d, e);
    }
    g() {
        let a = (this.textPlotArea.left - this.viewport.left) / this.viewport.width;
        let b = (this.textPlotArea.top - this.viewport.top) / this.viewport.height;
        let c = this.textPlotArea.width / this.viewport.width;
        let d = this.textPlotArea.height / this.viewport.height;
        this.textPlotArea = new RectData(a, b, c, d);
    }
    j(a) {
        let b = this.textPlotArea.left * a.width;
        let c = this.textPlotArea.top * a.height;
        let d = this.textPlotArea.width * a.width;
        let e = this.textPlotArea.height * a.height;
        this.textPlotArea = new RectData(b, c, d, e);
    }
    i() {
        let a = this.textPlotArea.left * this.viewport.width;
        let b = this.textPlotArea.top * this.viewport.height;
        let c = this.textPlotArea.width * this.viewport.width;
        let d = this.textPlotArea.height * this.viewport.height;
        this.textPlotArea = new RectData(a, b, c, d);
    }
}
ChartTitleVisualData.$t = markType(ChartTitleVisualData, 'ChartTitleVisualData');
