import { Pattern, IPatternSettings, IPatternPrivate } from "./Pattern"; export interface IPathPatternSettings extends IPatternSettings { /** * An SVG path to use as the pattern's motif. * * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths} for more information */ svgPath?: string; /** * Gap between motifs, in pixels. * * @default 0 */ gap?: number; /** * The path is scaled (keeping its aspect ratio) to fit within * `maxWidth` x `maxHeight` pixels. Without either, it keeps its own size. */ maxWidth?: number; /** * The path is scaled (keeping its aspect ratio) to fit within * `maxWidth` x `maxHeight` pixels. Without either, it keeps its own size. */ maxHeight?: number; /** * If set to `true`, will place every second motif, creating a checkered * pattern. * * @default false */ checkered?: boolean; /** * Center motifs in their grid cell. * * @default true */ centered?: boolean; } export interface IPathPatternPrivate extends IPatternPrivate { } /** * A pattern that repeats an SVG path as a motif on a grid. * * Note: `rotation` rotates each motif around its own centre (the grid stays * axis-aligned), so the pattern tiles seamlessly at any angle. * * The tile is one grid cell, unless `width` and `height` are set: then that * is the tile, as before 5.20.0. * * @since 5.2.33 * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more info */ export declare class PathPattern extends Pattern { _settings: IPathPatternSettings; _privateSettings: IPathPatternPrivate; static className: string; static classNames: Array; canvas: HTMLCanvasElement; context: CanvasRenderingContext2D; protected _clearPath: boolean; protected _bbox: { x: number; y: number; w: number; h: number; }; protected _bboxPath: string | undefined; _beforeChanged(): void; /** * The tile is only a repeat unit (the grid repeats every cell), so shrink an * oversized `width`/`height` to a single cell (2x2 when `checkered`). Skipped * for non-`repeat` repetitions, and when the chart set the tile's size. * @ignore */ protected _optimizeTileSize(): void; protected _authored(key: "width" | "height"): boolean; /** * The motif's scale and the box it takes: `maxWidth` x `maxHeight`, or the * path's own size when neither is set. * @ignore */ protected _motif(): { scale: number; w: number; h: number; }; _changed(): void; protected _renderPattern(svgPath: string): void; /** * Native geometry bounding box of an SVG path, via a throwaway ``. * @ignore */ protected _getPathBounds(svgPath: string): { x: number; y: number; w: number; h: number; }; } //# sourceMappingURL=PathPattern.d.ts.map