UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

103 lines 5.93 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Line = void 0; class Line { constructor(data) { let captionHorizontalOffsetDefault = 0; this.captionHorizontalOffset = typeof (data === null || data === void 0 ? void 0 : data.captionHorizontalOffset) !== "undefined" ? data === null || data === void 0 ? void 0 : data.captionHorizontalOffset : captionHorizontalOffsetDefault; let captionPositioningDefault = ""; this.captionPositioning = typeof (data === null || data === void 0 ? void 0 : data.captionPositioning) !== "undefined" ? data === null || data === void 0 ? void 0 : data.captionPositioning : captionPositioningDefault; let captionVerticalOffsetDefault = 0; this.captionVerticalOffset = typeof (data === null || data === void 0 ? void 0 : data.captionVerticalOffset) !== "undefined" ? data === null || data === void 0 ? void 0 : data.captionVerticalOffset : captionVerticalOffsetDefault; let endStyleDefault = ""; this.endStyle = typeof (data === null || data === void 0 ? void 0 : data.endStyle) !== "undefined" ? data === null || data === void 0 ? void 0 : data.endStyle : endStyleDefault; let leaderLineExtensionLengthDefault = 0; this.leaderLineExtensionLength = typeof (data === null || data === void 0 ? void 0 : data.leaderLineExtensionLength) !== "undefined" ? data === null || data === void 0 ? void 0 : data.leaderLineExtensionLength : leaderLineExtensionLengthDefault; let leaderLineLengthDefault = 0; this.leaderLineLength = typeof (data === null || data === void 0 ? void 0 : data.leaderLineLength) !== "undefined" ? data === null || data === void 0 ? void 0 : data.leaderLineLength : leaderLineLengthDefault; let leaderLineOffsetLengthDefault = 0; this.leaderLineOffsetLength = typeof (data === null || data === void 0 ? void 0 : data.leaderLineOffsetLength) !== "undefined" ? data === null || data === void 0 ? void 0 : data.leaderLineOffsetLength : leaderLineOffsetLengthDefault; let showCaptionDefault = false; this.showCaption = typeof (data === null || data === void 0 ? void 0 : data.showCaption) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showCaption : showCaptionDefault; let startStyleDefault = ""; this.startStyle = typeof (data === null || data === void 0 ? void 0 : data.startStyle) !== "undefined" ? data === null || data === void 0 ? void 0 : data.startStyle : startStyleDefault; } static getCaptionHorizontalOffsetDefault() { return 0; } static getCaptionHorizontalOffsetDescription() { return "The horizontal offset of the caption's leading letter in relation to it's normal position."; } static getCaptionPositioningDefault() { return ""; } static getCaptionPositioningDescription() { return "The positioning method for the caption of the line. Possible values are \"Inline\" (superimposed) and \"Top\" (above the line)."; } static getCaptionVerticalOffsetDefault() { return 0; } static getCaptionVerticalOffsetDescription() { return "The vertical offset of the caption's leading letter in relation to it's normal position."; } static getEndStyleDefault() { return ""; } static getEndStyleDescription() { return "Selects the Line ending style at the end of the line. Possible values are: Square, Circle, Diamond, OpenArrow, ClosedArrow, None, Butt, ROpenArrow, RClosedArrow, Slash"; } static getLeaderLineExtensionLengthDefault() { return 0; } static getLeaderLineExtensionLengthDescription() { return "A non-negative number that shall represent the length of leader line extensions that extend from the line proper 180 degrees from the leader lines. (0 = no leader line extensions)"; } static getLeaderLineLengthDefault() { return 0; } static getLeaderLineLengthDescription() { return "The length of leader lines that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point; a negative value shall indicate the opposite direction.(0 = no leader lines)"; } static getLeaderLineOffsetLengthDefault() { return 0; } static getLeaderLineOffsetLengthDescription() { return "A non-negative number that shall represent the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines."; } static getShowCaptionDefault() { return false; } static getShowCaptionDescription() { return "When set to true the line shall display a textual caption."; } static getStartStyleDefault() { return ""; } static getStartStyleDescription() { return "Selects the Line ending style at the start of the line."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new Line(data); } toJson() { return { 'captionHorizontalOffset': this.captionHorizontalOffset, 'captionPositioning': this.captionPositioning, 'captionVerticalOffset': this.captionVerticalOffset, 'endStyle': this.endStyle, 'leaderLineExtensionLength': this.leaderLineExtensionLength, 'leaderLineLength': this.leaderLineLength, 'leaderLineOffsetLength': this.leaderLineOffsetLength, 'showCaption': this.showCaption, 'startStyle': this.startStyle, }; } clone() { return Line.fromJson(this.toJson()); } } exports.Line = Line; //# sourceMappingURL=Line.js.map