all files / graphics/figures/base/ graphics-element.js

100% Statements 15/15
50% Branches 3/6
100% Functions 4/4
100% Lines 15/15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23     10× 10× 10× 10× 10×   10× 10× 10×          
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var PdfGraphicsElement = (function () {
        function PdfGraphicsElement() {
        }
        PdfGraphicsElement.prototype.drawHelper = function (graphics, x, y) {
            var bNeedSave = (x !== 0 || y !== 0);
            var gState = null;
            Eif (bNeedSave) {
                gState = graphics.save();
                graphics.translateTransform(x, y);
            }
            this.drawInternal(graphics);
            Eif (bNeedSave) {
                graphics.restore(gState);
            }
        };
        return PdfGraphicsElement;
    }());
    exports.PdfGraphicsElement = PdfGraphicsElement;
});