define(["require", "exports", "./canvas-renderer", "./svg-renderer"], function (require, exports, canvas_renderer_1, svg_renderer_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var BarcodeRenderer = (function () {
function BarcodeRenderer(name, isSvgMode) {
this.renderer = null;
this.isSvgMode = null;
this.isSvgMode = isSvgMode;
this.renderer = isSvgMode ? new svg_renderer_1.BarcodeSVGRenderering() : new canvas_renderer_1.BarcodeCanvasRenderer();
}
BarcodeRenderer.prototype.renderRootElement = function (attribute, backGroundColor, width, height) {
var canvasObj = this.renderer.renderRootElement(attribute, backGroundColor, width, height);
return canvasObj;
};
BarcodeRenderer.prototype.renderRectElement = function (canvas, attribute) {
var canvasObj = this.renderer.renderRect(canvas, attribute);
return canvasObj;
};
BarcodeRenderer.prototype.renderTextElement = function (canvas, attribute) {
var canvasObj = this.renderer.renderText(canvas, attribute);
return canvasObj;
};
return BarcodeRenderer;
}());
exports.BarcodeRenderer = BarcodeRenderer;
});
|