svg.d.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { CommonOutputJax, UnknownBBox } from './common/OutputJax.js';
  2. import { OptionList } from '../util/Options.js';
  3. import { MathDocument } from '../core/MathDocument.js';
  4. import { MathItem } from '../core/MathItem.js';
  5. import { MmlNode } from '../core/MmlTree/MmlNode.js';
  6. import { SVGWrapper } from './svg/Wrapper.js';
  7. import { SVGWrapperFactory } from './svg/WrapperFactory.js';
  8. import { SVGFontData } from './svg/FontData.js';
  9. import { StyleList as CssStyleList } from '../util/StyleList.js';
  10. import { FontCache } from './svg/FontCache.js';
  11. export declare const SVGNS = "http://www.w3.org/2000/svg";
  12. export declare const XLINKNS = "http://www.w3.org/1999/xlink";
  13. export declare class SVG<N, T, D> extends CommonOutputJax<N, T, D, SVGWrapper<N, T, D>, SVGWrapperFactory<N, T, D>, SVGFontData, typeof SVGFontData> {
  14. static NAME: string;
  15. static OPTIONS: OptionList;
  16. static commonStyles: CssStyleList;
  17. static FONTCACHEID: string;
  18. static STYLESHEETID: string;
  19. factory: SVGWrapperFactory<N, T, D>;
  20. fontCache: FontCache<N, T, D>;
  21. minwidth: number;
  22. shift: number;
  23. container: N;
  24. svgStyles: N;
  25. constructor(options?: OptionList);
  26. initialize(): void;
  27. clearFontCache(): void;
  28. reset(): void;
  29. protected setScale(node: N): void;
  30. escaped(math: MathItem<N, T, D>, html: MathDocument<N, T, D>): N;
  31. styleSheet(html: MathDocument<N, T, D>): N;
  32. pageElements(html: MathDocument<N, T, D>): N;
  33. protected findCache(html: MathDocument<N, T, D>): boolean;
  34. protected processMath(math: MmlNode, parent: N): void;
  35. protected createRoot(wrapper: SVGWrapper<N, T, D>): [N, N];
  36. protected typesetSVG(wrapper: SVGWrapper<N, T, D>, svg: N, g: N): void;
  37. protected setIndent(svg: N, align: string, shift: number): void;
  38. ex(m: number): string;
  39. svg(kind: string, properties?: OptionList, children?: (N | T)[]): N;
  40. unknownText(text: string, variant: string): N;
  41. measureTextNode(text: N): UnknownBBox;
  42. }