nhanh-pure-function
Version:
71 lines (70 loc) • 2.79 kB
TypeScript
import { default as QuickMethod } from './core/quikmethod';
import { default as LayerGroup } from './LayerGroup';
import { default as OverlayGroup, OverlayType } from './OverlayGroup';
import { default as Layer } from './LayerGroup/layer';
import { default as Point } from './OverlayGroup/point';
import { default as Text } from './OverlayGroup/text';
import { default as Line } from './OverlayGroup/line';
import { default as Polygon } from './OverlayGroup/polygon';
import { default as Custom } from './OverlayGroup/custom';
import { default as Arc } from './OverlayGroup/arc';
import { default as ArcTo } from './OverlayGroup/arcTo';
import { DeepArray } from './common.type';
export type * from './index.types';
type ConstructorOption = ConstructorParameters<typeof QuickMethod>[0] & {
/** 轴线显示属性 */
axisShow?: Parameters<_Canvas["toggleAxis"]>[0];
};
/**
* 你好啊你好的画布工具类
* 提供图形绘制、动态渲染等画布相关功能,支持复杂场景下的可视化展示
*
* 使用示例:
* - GitHub演示:
* - 基础画布: https://adminnhanh.github.io/nhanh-frontend-view/#/canvas/_Canvas
* - 动态图表(月牙定理): https://adminnhanh.github.io/nhanh-frontend-view/#/math/DynamicDiagram/%E6%9C%88%E7%89%99%E5%AE%9A%E7%90%86
* - 阿里云演示:
* - 基础画布: https://nhanh.xin/#/canvas/_Canvas
* - 动态图表(月牙定理): https://nhanh.xin/#/math/DynamicDiagram/%E6%9C%88%E7%89%99%E5%AE%9A%E7%90%86
*/
export declare class _Canvas extends QuickMethod {
/** 图层群组 */
static LayerGroup: typeof LayerGroup;
/** 图层 */
static Layer: typeof Layer;
/** 覆盖物群组 */
static OverlayGroup: typeof OverlayGroup;
/** 文字 */
static Text: typeof Text;
/** 点位 */
static Point: typeof Point;
/** 线段 */
static Line: typeof Line;
/** 多边形 */
static Polygon: typeof Polygon;
/** 自定义绘制 */
static Custom: typeof Custom;
/** 圆弧 */
static Arc: typeof Arc;
/** 圆角 */
static ArcTo: typeof ArcTo;
constructor(option: ConstructorOption);
private initLayerGroups;
/** 获取图层群组 集合 */
gteLayerGroups(key?: string): LayerGroup | undefined;
/** 设置图层群组 */
setLayerGroup(layerGroup: LayerGroup): void;
/** 移除图层群组 */
removeLayerGroup(layerGroup: LayerGroup): void;
/** 添加图层 */
addLayer(layers: DeepArray<Layer>): void;
/** 移除图层 */
removeLayer(layers: DeepArray<Layer>): void;
/** 添加覆盖物 */
addOverlay(overlays: DeepArray<OverlayType>): void;
/** 移除覆盖物 */
removeOverlay(overlays: DeepArray<OverlayType>): void;
/** 销毁 */
destroy(): void;
}
export default _Canvas;