UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

73 lines 2.75 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FreeTextFont = void 0; class FreeTextFont { constructor(data) { let boldDefault = false; this.bold = typeof (data === null || data === void 0 ? void 0 : data.bold) !== "undefined" ? data === null || data === void 0 ? void 0 : data.bold : boldDefault; let colorDefault = "#A0A0A0"; this.color = typeof (data === null || data === void 0 ? void 0 : data.color) !== "undefined" ? data === null || data === void 0 ? void 0 : data.color : colorDefault; let italicDefault = false; this.italic = typeof (data === null || data === void 0 ? void 0 : data.italic) !== "undefined" ? data === null || data === void 0 ? void 0 : data.italic : italicDefault; let nameDefault = ""; this.name = typeof (data === null || data === void 0 ? void 0 : data.name) !== "undefined" ? data === null || data === void 0 ? void 0 : data.name : nameDefault; let sizeDefault = 24; this.size = typeof (data === null || data === void 0 ? void 0 : data.size) !== "undefined" ? data === null || data === void 0 ? void 0 : data.size : sizeDefault; } static getBoldDefault() { return false; } static getBoldDescription() { return "Used to increase the text output's weight."; } static getColorDefault() { return "#A0A0A0"; } static getColorDescription() { return "Used to set the font color. The hereby defined color needs to be specified as a hexadecimal RGB value with a number sign before it."; } static getItalicDefault() { return false; } static getItalicDescription() { return "Used to set the italic font posture for the text output."; } static getNameDefault() { return ""; } static getNameDescription() { return "Used to specify the name of the font that should be used for the text output."; } static getSizeDefault() { return 24; } static getSizeDescription() { return "Used to set the text size for the text output."; } static getSizeMin() { return 1; } static getSizeMax() { return 1296; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new FreeTextFont(data); } toJson() { return { 'bold': this.bold, 'color': this.color, 'italic': this.italic, 'name': this.name, 'size': this.size, }; } clone() { return FreeTextFont.fromJson(this.toJson()); } } exports.FreeTextFont = FreeTextFont; //# sourceMappingURL=FreeTextFont.js.map