igniteui-angular-gauges
Version:
Ignite UI Angular gauge components.
102 lines (101 loc) • 4.09 kB
JavaScript
/*
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, Point_$type, markType } from "igniteui-angular-core";
import { PathGeometry } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { LineSegment } from "igniteui-angular-core";
import { BrushUtil } from "igniteui-angular-core";
/**
* @hidden
*/
export let LinearGraphRectFrame = /*@__PURE__*/ (() => {
class LinearGraphRectFrame extends Base {
constructor() {
super(...arguments);
this.e = 0;
this.f = 0;
this.b = 0;
this.c = 0;
this.g = 0;
this.d = 0;
this.i = null;
this.j = null;
this.h = 0;
}
k(a, b, c, d) {
let e = new PathGeometry();
let f = new PathFigure();
let g, h, i, j;
if (d == 1) {
g = ((() => {
let $ret = new LineSegment(1);
$ret.c = { $type: Point_$type, x: a.x + b * this.b, y: c - this.d };
return $ret;
})());
h = ((() => {
let $ret = new LineSegment(1);
$ret.c = { $type: Point_$type, x: a.x + b * this.c, y: c - this.d };
return $ret;
})());
i = ((() => {
let $ret = new LineSegment(1);
$ret.c = { $type: Point_$type, x: a.x + b * this.f, y: c - this.g };
return $ret;
})());
j = ((() => {
let $ret = new LineSegment(1);
$ret.c = { $type: Point_$type, x: a.x + b * this.e, y: c - this.g };
return $ret;
})());
}
else {
g = ((() => {
let $ret = new LineSegment(1);
$ret.c = { $type: Point_$type, x: this.g, y: b * (1 - this.f) };
return $ret;
})());
h = ((() => {
let $ret = new LineSegment(1);
$ret.c = { $type: Point_$type, x: this.d, y: b * (1 - this.c) };
return $ret;
})());
i = ((() => {
let $ret = new LineSegment(1);
$ret.c = { $type: Point_$type, x: this.d, y: b * (1 - this.b) };
return $ret;
})());
j = ((() => {
let $ret = new LineSegment(1);
$ret.c = { $type: Point_$type, x: this.g, y: b * (1 - this.e) };
return $ret;
})());
}
f._startPoint = g.c;
f._segments.add(h);
f._segments.add(i);
f._segments.add(j);
f._isClosed = true;
e.c.add(f);
return e;
}
static a(a, b, c, d) {
let e = new LinearGraphRectFrame();
e.i = BrushUtil.n(c.i, a, d.i, 0);
e.j = BrushUtil.n(c.j, a, d.j, 0);
e.h = b * c.h + a * d.h;
e.e = b * c.e + a * d.e;
e.f = b * c.f + a * d.f;
e.g = b * c.g + a * d.g;
e.d = b * c.d + a * d.d;
e.b = b * c.b + a * d.b;
e.c = b * c.c + a * d.c;
return e;
}
}
LinearGraphRectFrame.$t = markType(LinearGraphRectFrame, 'LinearGraphRectFrame');
return LinearGraphRectFrame;
})();