image-js
Version:
Image processing and manipulation in JavaScript
30 lines • 1.43 kB
TypeScript
import type { Point } from '../../geometry/index.js';
/**
* Get the coordinates of the points on a circle. The reference is the center of the circle.
* The first point is the right one and they are then sorted clockwise.
* @param radius - Radius of the circle.
* @returns The coordinates of the points on a circle of given diameter.
*/
export declare function getCirclePoints(radius: number): Point[];
/**
* Get the coordinates of the points in a circle of given radius. The points are sorted by column then row.
* @param radius - Radius of the circle.
* @param center - Center of the circle.
* @returns The coordinates of the points in a circle of given radius.
*/
export declare function getFilledCirclePoints(radius: number, center?: Point): Point[];
/**
* Get the coordinates of the points on a line.
* @param from - Starting point.
* @param to - End point.
* @returns The coordinates of the points on the line.
*/
export declare function getLinePoints(from: Point, to: Point): Point[];
/**
* Get the coordinates of the points that are on right, bottom, left and top at a given radius. The reference is the origin of the circle.
* First point is the most on the right, then points are in clockwise order.
* @param radius - Radius of the circle.
* @returns The coordinates of the compass points.
*/
export declare function getCompassPoints(radius: number): Point[];
//# sourceMappingURL=getCirclePoints.d.ts.map