import { Datum } from './oncoprintmodel'; import { RGBAColor } from './oncoprintruleset'; type StringParameter = 'type'; type PercentNumberParameter = 'width' | 'height' | 'x' | 'y' | 'x1' | 'x2' | 'x3' | 'y1' | 'y2' | 'y3'; type PlainNumberParameter = 'z' | 'stroke-width' | 'stroke-opacity'; type RGBAParameter = 'stroke' | 'fill'; type NumberParameter = PercentNumberParameter | PlainNumberParameter; type Parameter = StringParameter | NumberParameter | RGBAParameter; type StringParamFunction = (d: Datum) => string; type NumberParamFunction = (d: Datum) => number; type RGBAParamFunction = (d: Datum) => RGBAColor; export type ShapeParams = { [x in StringParameter]?: string | StringParamFunction; } & { [x in NumberParameter]?: number | NumberParamFunction; } & { [x in RGBAParameter]?: RGBAColor | RGBAParamFunction; }; export type ComputedShapeParams = { [x in StringParameter]?: string; } & { [x in NumberParameter]?: number; } & { [x in RGBAParameter]?: RGBAColor; }; export declare class Shape { private params; private static cache; private params_with_type; private onlyDependsOnWidthAndHeight; private instanceCache; constructor(params: ShapeParams); static hashComputedShape(computed_params: ComputedShapeParams, z_index?: number | string): string; private static getCachedShape; getRequiredParameters(): Parameter[]; completeWithDefaults(): void; markParameterTypes(): void; getComputedParams(d: Datum, base_width: number, base_height: number): ComputedShapeParams; } type SpecificComputedShapeParams = { [x in ShapeParamType & StringParameter]: string; } & { [x in ShapeParamType & NumberParameter]: number; } & { [x in ShapeParamType & RGBAParameter]: RGBAColor; }; type RectangleParameter = 'width' | 'height' | 'x' | 'y' | 'z' | 'stroke' | 'stroke-width' | 'fill'; export type ComputedRectangleParams = SpecificComputedShapeParams; export declare class Rectangle extends Shape { getRequiredParameters(): RectangleParameter[]; } type TriangleParameter = 'x1' | 'x2' | 'x3' | 'y1' | 'y2' | 'y3' | 'z' | 'stroke' | 'stroke-width' | 'fill'; export type ComputedTriangleParams = SpecificComputedShapeParams; export declare class Triangle extends Shape { getRequiredParameters(): TriangleParameter[]; } export type EllipseParameter = 'width' | 'height' | 'x' | 'y' | 'z' | 'stroke' | 'stroke-width' | 'fill'; export type ComputedEllipseParams = SpecificComputedShapeParams; export declare class Ellipse extends Shape { getRequiredParameters(): EllipseParameter[]; } export type LineParameter = 'x1' | 'y1' | 'x2' | 'y2' | 'z' | 'stroke' | 'stroke-width'; export type ComputedLineParams = SpecificComputedShapeParams; export declare class Line extends Shape { getRequiredParameters(): LineParameter[]; } export {};