UNPKG

@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.

22 lines (21 loc) 543 B
import { ShapeDefinition } from "./ShapeDefinition.js"; /** * Class representing a line definition. */ export class LineDefinition extends ShapeDefinition { /** The starting point of the line. */ start; /** The ending point of the line. */ end; /** * Creates an instance of LineDefinition. * * @param start - The starting point of the line. * @param end - The ending point of the line. */ constructor(start, end) { super(); this.start = start; this.end = end; } }