import { CanvasComponent } from '..'; import { CircleColorSettings } from '../config/types'; /** * Describes a circle in the canvas */ declare class Circle { /** * Radius of the circle */ private radiusSettings; /** * The colorId of the circle */ private colorId; /** * Color of the circle */ private colorSettings; /** * Value to be displayed inside the circle */ private value; /** * X Position of the circle */ private x; /** * Y Position of the circle */ private y; /** * For constructing a new circle * * @param {string} value * @param {number} radius * @param {CircleColorSettings} colorSettings */ constructor(value: string, radius: number, colorSettings: CircleColorSettings); /** * Draw the circle * * @param {CanvasRenderingContext2D} ctx * @param {number} radius * @param {string} color */ private drawCircle; /** * Draw the border * * @param {CanvasRenderingContext2D} ctx */ private drawBorder; /** * Write the text * * @param {CanvasRenderingContext2D} ctx */ private writeText; /** * Get the current radius * * @return {number} */ getRadius(): number; /** * Increase radius of the circle * @param {number} maxRadius * @return {boolean} - Weather size was changed */ grow(maxRadius?: number): boolean; /** * Decrease the radius of the circle * @param {number} minRadius * @return {boolean} - Weather size was changed */ shrink(minRadius?: number): boolean; /** * Bring the circle back to its original radius * @return {boolean} - Weather size was changed */ restoreCircle(): boolean; /** * Set the color id of the circle * * @param {string} colorId */ setColorId(colorId: string): void; /** * Set the x and y coordinates of the circle * * @param {number} x * @param {number} y */ setCoordinates(x: number, y: number): void; /** * Draw the circle on the screen * Draw the border * Add the text * * @param {CanvasComponent} comp * @return {string} - The color id represented by the unique color */ draw(comp: CanvasComponent): string; } export default Circle;