all files / graphics/figures/ arc.js

40% Statements 22/55
14.1% Branches 11/78
72.73% Functions 8/11
36.54% Lines 19/52
11 statements, 6 functions, 9 branches Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79                                                                                                                       
/* istanbul ignore next */ 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
define(["require", "exports", "./../pdf-pen", "./../figures/base/element-layouter", "./../../drawing/pdf-drawing", "./../figures/ellipse-part"], function (require, exports, pdf_pen_1, element_layouter_1, pdf_drawing_1, ellipse_part_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var PdfArc = (function (_super) {
        __extends(PdfArc, _super);
        function PdfArc(arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
            var _this = this;
            if (typeof arg1 === 'undefined') {
                _this = _super.call(this) || this;
            }
            else if (arg1 instanceof pdf_drawing_1.RectangleF) {
                _this = _super.call(this, arg1, arg2, arg3) || this;
            }
            else if (arg1 instanceof pdf_pen_1.PdfPen) {
                if (arg2 instanceof pdf_drawing_1.RectangleF) {
                    _this = _super.call(this, arg1, null, arg2, arg3, arg4) || this;
                }
                else if (typeof arg6 === 'undefined' && typeof arg7 === 'undefined') {
                    _this = _super.call(this, arg1, null, 0, 0, arg2, arg3, arg4, arg5) || this;
                }
                else if (typeof arg6 !== 'undefined' && typeof arg7 !== 'undefined') {
                    _this = _super.call(this, arg1, null, arg2, arg3, arg4, arg5, arg6, arg7) || this;
                }
            }
            else if (typeof arg1 !== 'undefined' && typeof arg5 === 'undefined' && typeof arg6 === 'undefined') {
                _this = _super.call(this, 0, 0, arg1, arg2, arg3, arg4) || this;
            }
            else if (typeof arg1 !== 'undefined' && typeof arg5 !== 'undefined' && typeof arg6 !== 'undefined') {
                _this = _super.call(this, arg1, arg2, arg3, arg4, arg5, arg6) || this;
            }
            return _this;
        }
        PdfArc.prototype.draw = function (argu1, arg2, arg3, arg4) {
            if (arg2 instanceof pdf_drawing_1.PointF && typeof arg2.width === 'undefined' && typeof arg3 === 'undefined') {
                return this.drawHelper(argu1, arg2.x, arg2.y);
            }
            else if (arg2 instanceof pdf_drawing_1.RectangleF && typeof arg2.width !== 'undefined' && typeof arg3 === 'undefined') {
                return this.drawHelper(argu1, arg2, null);
            }
            else if (typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'undefined') {
                return this.drawHelper(argu1, arg2, arg3, null);
            }
            else if (arg2 instanceof pdf_drawing_1.PointF && arg3 instanceof element_layouter_1.PdfLayoutFormat) {
                return this.drawHelper(argu1, arg2.x, arg2.y, arg3);
            }
            else if (typeof arg2 === 'number' && (arg4 instanceof element_layouter_1.PdfLayoutFormat || arg4 == null) && typeof arg3 === 'number') {
                var widthValue = (argu1.graphics.clientSize.width - arg2);
                var layoutRect = new pdf_drawing_1.RectangleF(arg2, arg3, widthValue, 0);
                return this.drawHelper(argu1, layoutRect, arg4);
            }
            else {
                return this.drawHelper(argu1, arg2, arg3);
            }
        };
        PdfArc.prototype.drawInternal = function (graphics) {
            if ((graphics == null)) {
                throw new Error('ArgumentNullException : graphics');
            }
            graphics.drawArc(this.obtainPen(), this.bounds, this.startAngle, this.sweepAngle);
        };
        return PdfArc;
    }(ellipse_part_1.PdfEllipsePart));
    exports.PdfArc = PdfArc;
});