export interface ShapeStyle { type?: 'circle' | 'rectangle'; fill?: string; stroke?: string; strokeDash?: number[]; strokeWidth?: number; } export interface CircleStyle extends ShapeStyle { type: 'circle'; radius?: number; } export interface RectangleStyle extends ShapeStyle { type: 'rectangle'; width?: number; height?: number; } /** * Lazily apply shape attributes to another shape style * @param source * @param target */ declare function applyShapeAttributes(target: ShapeStyle, source: ShapeStyle): void; /** * Lazily apply shape style attributes to another shape style. * @param target * @param source */ declare function applyShapeStyleAttributes(target: ShapeStyle, source: ShapeStyle): void; /** * Create a clone of a shape style * @param style */ declare function cloneShapeStyle(style: ShapeStyle): ShapeStyle; declare function convertToShape(style: ShapeStyle, type: 'circle' | 'rectangle' | null): ShapeStyle; /** * Returns true if shape styles are equivalent, false otherwise * @param a * @param b */ declare function equivalentShapeStyles(a: ShapeStyle, b: ShapeStyle): boolean; /** * Returns true if style is a CircleStyle, false otherwise * @param style */ declare function isCircleStyle(style: ShapeStyle): style is CircleStyle; /** * Returns true is style is a RectangleStyle, false otherwise * @param style */ declare function isRectangleStyle(style: ShapeStyle): style is RectangleStyle; export { applyShapeAttributes, applyShapeStyleAttributes, cloneShapeStyle, convertToShape, equivalentShapeStyles, isCircleStyle, isRectangleStyle };