import type { Pattern } from "../render/patterns/Pattern"; import type { Color } from "./Color"; import { LinePattern, ILinePatternSettings } from "../render/patterns/LinePattern"; import { RectanglePattern, IRectanglePatternSettings } from "../render/patterns/RectanglePattern"; import { CirclePattern, ICirclePatternSettings } from "../render/patterns/CirclePattern"; import { Entity, IEntitySettings, IEntityPrivate } from "./Entity"; export interface IPatternSetSettings extends IEntitySettings { /** * The patterns in the set. A built-in list of 16 patterns if not set. */ patterns?: Pattern[]; /** * How many positions `next()` moves each time: `2` returns every second * pattern. * * @default 1 */ step?: number; /** * Color of the built-in patterns, used when `patterns` is not set. Changing * it after the set is created has no effect. * * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Colors} for more info */ color?: Color; /** * Index of the pattern the first `next()` returns, and `reset()` goes back * to. * * @default 0 */ startIndex?: number; } export interface IPatternSetPrivate extends IEntityPrivate { /** * Index of the pattern the next `next()` returns. */ currentStep?: number; } /** * A list of [[Pattern]] objects that series and other elements take in turn. * * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Pattern_sets} for more info * @since 5.10.0 */ export declare class PatternSet extends Entity { static className: string; static classNames: Array; _settings: IPatternSetSettings; _privateSettings: IPatternSetPrivate; protected _afterNew(): void; _beforeChanged(): void; /** * Returns the [[Pattern]] at `index`. * * @param index Index * @return Pattern */ getIndex(index: number): Pattern; /** * Returns the next [[Pattern]] in the list, `step` positions after the last * one. * * @return Pattern */ next(): Pattern; /** * Starts over, so the next `next()` returns the pattern at `startIndex`. */ reset(): void; /** * Creates a [[LinePattern]] with these settings. * * @param settings Pattern settings * @return Pattern object */ getLinePattern(settings: ILinePatternSettings): LinePattern; /** * Creates a [[RectanglePattern]] with these settings. * * @param settings Pattern settings * @return Pattern object */ getRectanglePattern(settings: IRectanglePatternSettings): RectanglePattern; /** * Creates a [[CirclePattern]] with these settings. * * @param settings Pattern settings * @return Pattern object */ getCirclePattern(settings: ICirclePatternSettings): CirclePattern; } //# sourceMappingURL=PatternSet.d.ts.map