UNPKG

2.13 kBTypeScriptView Raw
1import { Coordinate } from '../dependents';
2import { Point } from '../interface';
3import { BBox } from './bbox';
4/**
5 * @ignore
6 * Gets x dimension length
7 * @param coordinate
8 * @returns x dimension length
9 */
10export declare function getXDimensionLength(coordinate: any): number;
11/**
12 * @ignore
13 * Determines whether full circle is
14 * @param coordinate
15 * @returns true if full circle
16 */
17export declare function isFullCircle(coordinate: Coordinate): boolean;
18/**
19 * @ignore
20 * 获取当前点到坐标系圆心的距离
21 * @param coordinate 坐标系
22 * @param point 当前点
23 * @returns distance to center
24 */
25export declare function getDistanceToCenter(coordinate: Coordinate, point: Point): number;
26/**
27 * @ignore
28 * 坐标点是否在坐标系中
29 * @param coordinate
30 * @param point
31 */
32export declare function isPointInCoordinate(coordinate: Coordinate, point: Point): boolean;
33/**
34 * @ignore
35 * 获取点到圆心的连线与水平方向的夹角
36 */
37export declare function getAngleByPoint(coordinate: Coordinate, point: Point): number;
38/**
39 * @ignore
40 * 获取同坐标系范围相同的剪切区域
41 * @param coordinate
42 * @returns
43 */
44export declare function getCoordinateClipCfg(coordinate: Coordinate, margin?: number): {
45 type: string;
46 startState: {
47 path: (string | number)[][];
48 x?: undefined;
49 y?: undefined;
50 width?: undefined;
51 height?: undefined;
52 };
53 endState: (ratio: any) => {
54 path: (string | number)[][];
55 };
56 attrs: {
57 path: (string | number)[][];
58 x?: undefined;
59 y?: undefined;
60 width?: undefined;
61 height?: undefined;
62 };
63} | {
64 type: string;
65 startState: {
66 x: number;
67 y: number;
68 width: number;
69 height: number;
70 path?: undefined;
71 };
72 endState: any;
73 attrs: {
74 x: number;
75 y: number;
76 width: number;
77 height: number;
78 path?: undefined;
79 };
80};
81/**
82 * 获取坐标系范围的 BBox
83 * @param coordinate
84 * @param margin
85 */
86export declare function getCoordinateBBox(coordinate: Coordinate, margin?: number): BBox;