UNPKG

igniteui-angular-gauges

Version:

Ignite UI Angular gauge components.

105 lines (104 loc) 4.11 kB
/* 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 { __extends } from "tslib"; 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 */ var LinearGraphRectFrame = /** @class */ /*@__PURE__*/ (function (_super) { __extends(LinearGraphRectFrame, _super); function LinearGraphRectFrame() { var _this = _super !== null && _super.apply(this, arguments) || this; _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; return _this; } LinearGraphRectFrame.prototype.k = function (a, b, c, d) { var _this = this; var e = new PathGeometry(); var f = new PathFigure(); var g, h, i, j; if (d == 1) { g = ((function () { var $ret = new LineSegment(1); $ret.c = { $type: Point_$type, x: a.x + b * _this.b, y: c - _this.d }; return $ret; })()); h = ((function () { var $ret = new LineSegment(1); $ret.c = { $type: Point_$type, x: a.x + b * _this.c, y: c - _this.d }; return $ret; })()); i = ((function () { var $ret = new LineSegment(1); $ret.c = { $type: Point_$type, x: a.x + b * _this.f, y: c - _this.g }; return $ret; })()); j = ((function () { var $ret = new LineSegment(1); $ret.c = { $type: Point_$type, x: a.x + b * _this.e, y: c - _this.g }; return $ret; })()); } else { g = ((function () { var $ret = new LineSegment(1); $ret.c = { $type: Point_$type, x: _this.g, y: b * (1 - _this.f) }; return $ret; })()); h = ((function () { var $ret = new LineSegment(1); $ret.c = { $type: Point_$type, x: _this.d, y: b * (1 - _this.c) }; return $ret; })()); i = ((function () { var $ret = new LineSegment(1); $ret.c = { $type: Point_$type, x: _this.d, y: b * (1 - _this.b) }; return $ret; })()); j = ((function () { var $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; }; LinearGraphRectFrame.a = function (a, b, c, d) { var 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; }(Base)); export { LinearGraphRectFrame };