Files
lan-manager/web/node_modules/@antv/g-svg/lib/shape/base.d.ts
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

51 lines
1.6 KiB
TypeScript

import { AbstractShape } from '@antv/g-base';
import { ShapeAttrs, ChangeType, BBox } from '@antv/g-base';
import { IShape } from '../interfaces';
import Defs from '../defs';
import * as Shape from './index';
import Group from '../group';
declare class ShapeBase extends AbstractShape implements IShape {
type: string;
canFill: boolean;
canStroke: boolean;
getDefaultAttrs(): {
lineWidth: number;
lineAppendWidth: number;
strokeOpacity: number;
fillOpacity: number;
matrix: any;
opacity: number;
};
afterAttrsChange(targetAttrs: ShapeAttrs): void;
getShapeBase(): typeof Shape;
getGroupBase(): typeof Group;
/**
* 一些方法调用会引起画布变化
* @param {ChangeType} changeType 改变的类型
*/
onCanvasChange(changeType: ChangeType): void;
calculateBBox(): BBox;
isFill(): boolean;
isStroke(): boolean;
draw(context: any, targetAttrs: any): void;
/**
* @protected
* 绘制图形的路径
* @param {Defs} context 上下文
* @param {ShapeAttrs} targetAttrs 渲染的目标属性
*/
createPath(context: Defs, targetAttrs?: ShapeAttrs): void;
strokeAndFill(context: any, targetAttrs?: any): void;
_setColor(context: any, attr: any, value: any): void;
shadow(context: any, targetAttrs?: any): void;
transform(targetAttrs?: any): void;
isInShape(refX: number, refY: number): boolean;
isPointInPath(refX: number, refY: number): boolean;
/**
* 获取线拾取的宽度
* @returns {number} 线的拾取宽度
*/
getHitLineWidth(): any;
}
export default ShapeBase;