@syncfusion/ej2-barcode-generator
Version:
Barcode generator component is a pure JavaScript library which will convert a string to Barcode and show it to the user. This supports major 1D and 2D barcodes including coda bar, code 128, QR Code.
46 lines (45 loc) • 1.72 kB
TypeScript
import { IBarcodeRenderer } from './IRenderer';
import { BaseAttributes } from './canvas-interface';
/**
* canvas renderer
*/
/** @private */
export declare class BarcodeCanvasRenderer implements IBarcodeRenderer {
/**
* Get the context value for the canvas.\
*
* @returns {CanvasRenderingContext2D} Get the context value for the canvas .
* @param {HTMLCanvasElement} canvas - Provide the canvas element .
* @private
*/
static getContext(canvas: HTMLCanvasElement): CanvasRenderingContext2D;
/**
* Draw the root element for the barcode.\
*
* @returns {HTMLElement} Draw the barcode SVG .
* @param {Object} attribute - Provide the canvas element .
* @param {string} backGroundColor - Provide the canvas element .
* @param {number} width - Provide the canvas element .
* @param {number} height - Provide the canvas element .
* @private
*/
renderRootElement(attribute: Object, backGroundColor: string, width: number, height: number): HTMLElement;
/**
* Draw the rect for the barcode.\
*
* @returns {HTMLElement} Draw the barcode SVG .
* @param {Object} canvas - Provide the canvas element .
* @param {Object} attribute - Provide the canvas element .
* @private
*/
renderRect(canvas: HTMLCanvasElement, attribute: BaseAttributes): HTMLElement;
/**
* Draw the text for the barcode.\
*
* @returns {HTMLElement} Draw the barcode SVG .
* @param {Object} canvas - Provide the canvas element .
* @param {Object} attribute - Provide the canvas element .
* @private
*/
renderText(canvas: HTMLCanvasElement, attribute: BaseAttributes): HTMLElement;
}