@syncfusion/ej2-pdfviewer
Version:
Essential JS 2 PDF viewer Component
128 lines (127 loc) • 4.8 kB
TypeScript
import { PointModel } from './../primitives/point-model';
import { RectAttributes, TextAttributes, LineAttributes, PathAttributes } from './canvas-interface';
import { StyleAttributes } from './canvas-interface';
import { CircleAttributes, SubTextElement, TextBounds } from './canvas-interface';
import { IRenderer } from './../rendering/IRenderer';
import { DrawingElement } from '../core/elements/drawing-element';
/**
* @hidden
* SVG Renderer
*/
export declare class SvgRenderer implements IRenderer {
/**
* @param {string} dashArray - dashArray
* @private
* @returns {number[]} - number[]
*/
parseDashArray(dashArray: string): number[];
/**
* @param {SVGElement} svg - svg
* @param {RectAttributes} options - options
* @param {string} diagramId - diagramId
* @param {boolean} onlyRect - onlyRect
* @param {boolean} isSelector - isSelector
* @param {SVGSVGElement} parentSvg - parentSvg
* @param {Object} ariaLabel - ariaLabel
* @private
* @returns {void} - void
*/
drawRectangle(svg: SVGElement, options: RectAttributes, diagramId: string, onlyRect?: boolean, isSelector?: Boolean, parentSvg?: SVGSVGElement, ariaLabel?: Object): void;
/**
* @param {SVGElement} gElement - gElement
* @param {RectAttributes} options - options
* @private
* @returns {void} - void
*/
updateSelectionRegion(gElement: SVGElement, options: RectAttributes): void;
/**
* @param {string} elementType - elementType
* @param {Object} attribute - attribute
* @private
* @returns {SVGGElement} - SVGGElement
*/
createGElement(elementType: string, attribute: Object): SVGGElement;
/**
* @param {SVGElement} gElement - gElement
* @param {CircleAttributes} options - options
* @param {number} enableSelector - enableSelector
* @param {Object} ariaLabel - ariaLabel
* @private
* @returns {void} - void
*/
drawCircle(gElement: SVGElement, options: CircleAttributes, enableSelector?: number, ariaLabel?: Object): void;
/**
* @param {SVGElement} svg - svg
* @param {StyleAttributes} style - style
* @param {string} diagramId - diagramId
* @private
* @returns {void} - void
*/
setSvgStyle(svg: SVGElement, style: StyleAttributes, diagramId?: string): void;
/**
* text utility
*
* @param {TextAttributes} text - text
* @param {TextBounds} wrapBound - wrapBound
* @param {SubTextElement[]} childNodes - childNodes
* @private
* @returns {PointModel} - PointModel
*/
svgLabelAlign(text: TextAttributes, wrapBound: TextBounds, childNodes: SubTextElement[]): PointModel;
/**
* @param {SVGElement} gElement - gElement
* @param {LineAttributes} options - options
* @private
* @returns {void} - void
*/
drawLine(gElement: SVGElement, options: LineAttributes): void;
/**
* @param {SVGElement} svg - svg
* @param {PathAttributes} options - options
* @param {string} diagramId - diagramId
* @param {boolean} isSelector - isSelector
* @param {SVGSVGElement} parentSvg - parentSvg
* @param {Object} ariaLabel - ariaLabel
* @private
* @returns {void} - void
*/
drawPath(svg: SVGElement, options: PathAttributes, diagramId: string, isSelector?: Boolean, parentSvg?: SVGSVGElement, ariaLabel?: Object): void;
/**
* @param {SVGElement} svg - svg
* @param {PathAttributes} options - options
* @param {Object[]} collection - collection
* @private
* @returns {void} - void
*/
renderPath(svg: SVGElement, options: PathAttributes, collection: Object[]): void;
}
/**
* @param {SVGElement} svg - svg
* @param {Object} attributes - attributes
* @private
* @returns {void} - void
*/
export declare function setAttributeSvg(svg: SVGElement, attributes: Object): void;
/**
* @param {SVGElement} elementType - elementType
* @param {PathAttributes} attribute - attribute
* @private
* @returns {SVGElement} - SVGElement
*/
export declare function createSvgElement(elementType: string, attribute: Object): SVGElement;
/**
* @param {string} id - id
* @param {string | Number} width - width
* @param {string | Number} height - height
* @private
* @returns {SVGElement} - SVGElement
*/
export declare function createSvg(id: string, width: string | Number, height: string | Number): SVGElement;
/**
* @param {DrawingElement} element - element
* @param {string} targetElement - targetElement
* @param {HTMLCanvasElement | SVGElement} canvas - canvas
* @private
* @returns {SVGElement} - SVGElement
*/
export declare function getParentSvg(element: DrawingElement, targetElement?: string, canvas?: HTMLCanvasElement | SVGElement): SVGElement;