@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) • 796 B
JavaScript
import { ShapeOptions } from "./ShapeOptions.js";
/**
* Options for configuring the behavior of a circle shape.
*/
export class CircleOptions {
/**
* Determines if the shape should be visible or not.
*/
visible;
/**
* Determines if the shape can be dragged by mouse.
*/
draggable;
/**
* Default options for the circle.
*/
static DefaultOptions = {
...ShapeOptions.DefaultOptions,
};
/**
* Creates a new instance of ICircleOptions.
*
* @param options - The partial options provided by the user.
*/
constructor(options = {}) {
const optionsWithDefaults = {
...CircleOptions.DefaultOptions,
...options
};
Object.assign(this, optionsWithDefaults);
}
}