defs.d.ts 939 B

1234567891011121314151617181920212223242526272829
  1. import { Attr, Filter, Marker } from '../registry';
  2. import { Base } from './base';
  3. export declare class DefsManager extends Base {
  4. protected get cid(): string;
  5. protected get svg(): SVGSVGElement;
  6. protected get defs(): SVGDefsElement;
  7. protected isDefined(id: string): boolean;
  8. filter(options: DefsManager.FilterOptions): string;
  9. gradient(options: DefsManager.GradientOptions): string;
  10. marker(options: DefsManager.MarkerOptions): string;
  11. remove(id: string): void;
  12. }
  13. export declare namespace DefsManager {
  14. type MarkerOptions = Marker.Result;
  15. interface GradientOptions {
  16. id?: string;
  17. type: string;
  18. stops: {
  19. offset: number;
  20. color: string;
  21. opacity?: number;
  22. }[];
  23. attrs?: Attr.SimpleAttrs;
  24. }
  25. type FilterOptions = (Filter.NativeItem | Filter.ManaualItem) & {
  26. id?: string;
  27. attrs?: Attr.SimpleAttrs;
  28. };
  29. }