@avolutions/canvas-painter
Version:
CanvasPainter.js is a simple yet powerful JavaScript library for drawing basic shapes (rectangles, circles, etc.) on HTML5 Canvas with ease. Perfect for creating 2D graphics in your web projects.
33 lines (32 loc) • 913 B
TypeScript
import { Point } from "../types/Point.js";
import { ShapeDefinition } from "./ShapeDefinition.js";
/**
* Class representing a circle definition.
*/
export declare class CircleDefinition extends ShapeDefinition {
/** The center point of the circle. */
center: Point;
/** The radius of the circle. */
private _radius;
/**
* Creates an instance of CircleDefinition.
*
* @param center - The center point of the circle.
* @param radius - The radius of the circle.
*/
constructor(center: Point, radius: number);
/**
* Gets the radius of the definition.
*
* @returns The radius of the definition.
*/
get radius(): number;
/**
* Sets the radius of the definition.
*
* @param radius - The new radius of the definition.
*
* @throws RangeError if negative radius is passed.
*/
set radius(radius: number);
}