all files / graphics/ pdf-transparency.js

53.85% Statements 7/13
100% Branches 0/0
50% Functions 2/4
53.85% Lines 7/13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                                
define(["require", "exports", "./../primitives/pdf-dictionary", "./../primitives/pdf-number", "./../primitives/pdf-name", "./../input-output/pdf-dictionary-properties"], function (require, exports, pdf_dictionary_1, pdf_number_1, pdf_name_1, pdf_dictionary_properties_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var PdfTransparency = (function () {
        function PdfTransparency(stroke, fill, mode) {
            this.dictionary = new pdf_dictionary_1.PdfDictionary();
            this.dictionaryProperties = new pdf_dictionary_properties_1.DictionaryProperties();
            this.dictionary.items.setValue(this.dictionaryProperties.CA, new pdf_number_1.PdfNumber(stroke));
            this.dictionary.items.setValue(this.dictionaryProperties.ca, new pdf_number_1.PdfNumber(fill));
            this.dictionary.items.setValue(this.dictionaryProperties.BM, new pdf_name_1.PdfName(mode.toString()));
        }
        Object.defineProperty(PdfTransparency.prototype, "element", {
            get: function () {
                return this.dictionary;
            },
            enumerable: true,
            configurable: true
        });
        return PdfTransparency;
    }());
    exports.PdfTransparency = PdfTransparency;
});