all files / core/fonts/ pdf-string-format.js

82.93% Statements 34/41
60% Branches 6/10
60% Functions 6/10
82.93% Lines 34/41
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                                   85× 85×                                                
define(["require", "exports", "./../enumerator"], function (require, exports, enumerator_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var PdfStringFormat = (function () {
        function PdfStringFormat(arg1, arg2) {
            this.horizontalScalingFactor = 100.0;
            this.rightToLeft = false;
            this._wordWrapType = enumerator_1._PdfWordWrapType.word;
            this._isList = false;
            this.lineLimit = true;
            Eif (typeof arg1 !== 'undefined') {
                this.alignment = arg1;
            }
            Eif (typeof arg2 !== 'undefined') {
                this.lineAlignment = arg2;
            }
            else {
                this.lineAlignment = PdfVerticalAlignment.top;
            }
            this.characterSpacing = 0;
            this.wordSpacing = 0;
            this.lineSpacing = 0;
            this.clipPath = false;
            this.firstLineIndent = 0;
            this._internalParagraphIndent = 0;
            this.measureTrailingSpaces = false;
            this.noClip = false;
        }
        Object.defineProperty(PdfStringFormat.prototype, "paragraphIndent", {
            get: function () {
                return this._internalParagraphIndent;
            },
            set: function (value) {
                this._internalParagraphIndent = value;
                this.firstLineIndent = value;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PdfStringFormat.prototype, "subSuperScript", {
            get: function () {
                Eif (typeof this._pdfSubSuperScript === 'undefined' || this._pdfSubSuperScript === null) {
                    return enumerator_1.PdfSubSuperScript.none;
                }
                else {
                    return this._pdfSubSuperScript;
                }
            },
            set: function (value) {
                this._pdfSubSuperScript = value;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PdfStringFormat.prototype, "_wordWrap", {
            get: function () {
                return this._wordWrapType;
            },
            set: function (value) {
                this._wordWrapType = value;
            },
            enumerable: true,
            configurable: true
        });
        return PdfStringFormat;
    }());
    exports.PdfStringFormat = PdfStringFormat;
    var PdfVerticalAlignment;
    (function (PdfVerticalAlignment) {
        PdfVerticalAlignment[PdfVerticalAlignment["top"] = 0] = "top";
        PdfVerticalAlignment[PdfVerticalAlignment["middle"] = 1] = "middle";
        PdfVerticalAlignment[PdfVerticalAlignment["bottom"] = 2] = "bottom";
    })(PdfVerticalAlignment = exports.PdfVerticalAlignment || (exports.PdfVerticalAlignment = {}));
});