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 __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var _PdfPathFigure = /** @class */ (function () {
    function _PdfPathFigure() {
        this._segments = [];
        this._isClosed = false;
        this._isFilled = false;
        this._startPoint = { x: 0, y: 0 };
    }
    _PdfPathFigure.prototype._clone = function () {
        var pathFigure = new _PdfPathFigure();
        pathFigure._isClosed = this._isClosed;
        pathFigure._isFilled = this._isFilled;
        pathFigure._startPoint = __assign({}, this._startPoint);
        for (var _i = 0, _a = this._segments; _i < _a.length; _i++) {
            var segment = _a[_i];
            pathFigure._segments.push(segment._clone());
        }
        return pathFigure;
    };
    return _PdfPathFigure;
}());
export { _PdfPathFigure };
var _PdfPathSegment = /** @class */ (function () {
    function _PdfPathSegment() {
    }
    return _PdfPathSegment;
}());
export { _PdfPathSegment };
var _PdfLineSegment = /** @class */ (function (_super) {
    __extends(_PdfLineSegment, _super);
    function _PdfLineSegment(point) {
        if (point === void 0) { point = { x: 0, y: 0 }; }
        var _this = _super.call(this) || this;
        _this._point = point;
        return _this;
    }
    _PdfLineSegment.prototype._clone = function () {
        return new _PdfLineSegment(__assign({}, this._point));
    };
    return _PdfLineSegment;
}(_PdfPathSegment));
export { _PdfLineSegment };
var _PdfBezierSegment = /** @class */ (function (_super) {
    __extends(_PdfBezierSegment, _super);
    function _PdfBezierSegment(point1, point2, point3) {
        if (point1 === void 0) { point1 = { x: 0, y: 0 }; }
        if (point2 === void 0) { point2 = { x: 0, y: 0 }; }
        if (point3 === void 0) { point3 = { x: 0, y: 0 }; }
        var _this = _super.call(this) || this;
        _this._point1 = point1;
        _this._point2 = point2;
        _this._point3 = point3;
        return _this;
    }
    _PdfBezierSegment.prototype._clone = function () {
        return new _PdfBezierSegment(__assign({}, this._point1), __assign({}, this._point2), __assign({}, this._point3));
    };
    return _PdfBezierSegment;
}(_PdfPathSegment));
export { _PdfBezierSegment };
