@visactor/vrender-core 0.17.23 → 0.18.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/cjs/allocator/allocator-modules.js +0 -2
  2. package/cjs/animate/config.js +1 -2
  3. package/cjs/common/custom-path2d.d.ts +0 -1
  4. package/cjs/common/custom-path2d.js +1 -5
  5. package/cjs/common/custom-path2d.js.map +1 -1
  6. package/cjs/graphic/config.js +1 -2
  7. package/cjs/graphic/config.js.map +1 -1
  8. package/cjs/graphic/richtext.d.ts +44 -1
  9. package/cjs/graphic/richtext.js +13 -2
  10. package/cjs/graphic/richtext.js.map +1 -1
  11. package/cjs/interface/graphic/richText.js.map +1 -1
  12. package/cjs/interface/graphic.d.ts +0 -1
  13. package/cjs/interface/graphic.js.map +1 -1
  14. package/cjs/render/contributions/render/draw-contribution.d.ts +1 -1
  15. package/cjs/render/contributions/render/draw-contribution.js +3 -8
  16. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  17. package/cjs/render/contributions/render/module.js.map +1 -1
  18. package/es/allocator/allocator-modules.js +0 -2
  19. package/es/animate/config.js +1 -2
  20. package/es/common/custom-path2d.d.ts +0 -1
  21. package/es/common/custom-path2d.js +1 -5
  22. package/es/common/custom-path2d.js.map +1 -1
  23. package/es/graphic/config.js +1 -2
  24. package/es/graphic/config.js.map +1 -1
  25. package/es/graphic/richtext.d.ts +44 -1
  26. package/es/graphic/richtext.js +13 -2
  27. package/es/graphic/richtext.js.map +1 -1
  28. package/es/interface/graphic/richText.js.map +1 -1
  29. package/es/interface/graphic.d.ts +0 -1
  30. package/es/interface/graphic.js.map +1 -1
  31. package/es/render/contributions/render/draw-contribution.d.ts +1 -1
  32. package/es/render/contributions/render/draw-contribution.js +3 -8
  33. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  34. package/es/render/contributions/render/module.js.map +1 -1
  35. package/package.json +1 -1
@@ -114,7 +114,6 @@ export type IGraphicStyle = ILayout & IFillStyle & IStrokeStyle & IPickStyle & {
114
114
  texturePadding: number;
115
115
  blur: number;
116
116
  cursor: Cursor | null;
117
- renderStyle?: 'default' | 'rough' | any;
118
117
  html: {
119
118
  dom: string | HTMLElement;
120
119
  container: string | HTMLElement | null;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/interface/graphic.ts"],"names":[],"mappings":"","file":"graphic.js","sourcesContent":["import type { IAABBBounds, IOBBBounds, IMatrix, IPointLike, IPoint } from '@visactor/vutils';\nimport type { IAnimate, IStep, EasingType, IAnimateTarget } from './animate';\nimport type { IColor } from './color';\nimport type { IGroup } from './graphic/group';\nimport type { IShadowRoot } from './graphic/shadow-root';\nimport type { ILayer } from './layer';\nimport type { INode } from './node-tree';\nimport type { ICustomPath2D } from './path';\nimport type { IStage } from './stage';\nimport type { IGlyphGraphicAttribute } from './graphic/glyph';\nimport type { IContainPointMode } from '../common/enums';\nimport type { IFace3d } from './graphic/face3d';\nimport type { IPickerService } from './picker';\nimport { ITheme } from './graphic/theme';\n\ntype IStrokeSeg = {\n start: number; // 百分比\n // end和length二选一\n end: number; // 百分比\n length: number; // 像素长度\n};\n\n// TODO 最后加一个any\nexport type GraphicType =\n | 'area'\n | 'circle'\n | 'ellipse'\n | 'line'\n | 'rect'\n | 'rect3d'\n | 'path'\n | 'richtext'\n | 'text'\n | 'arc'\n | 'arc3d'\n | 'image'\n | 'symbol'\n | 'group'\n | 'shadowroot'\n | 'polygon'\n | 'pyramid3d'\n | 'glyph';\n\n// Cursor style\n// See: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\nexport type Cursor =\n | 'auto'\n | 'default'\n | 'none'\n | 'context-menu'\n | 'help'\n | 'pointer'\n | 'progress'\n | 'wait'\n | 'cell'\n | 'crosshair'\n | 'text'\n | 'vertical-text'\n | 'alias'\n | 'copy'\n | 'move'\n | 'no-drop'\n | 'not-allowed'\n | 'grab'\n | 'grabbing'\n | 'all-scroll'\n | 'col-resize'\n | 'row-resize'\n | 'n-resize'\n | 'e-resize'\n | 's-resize'\n | 'w-resize'\n | 'ne-resize'\n | 'nw-resize'\n | 'se-resize'\n | 'sw-resize'\n | 'ew-resize'\n | 'ns-resize'\n | 'nesw-resize'\n | 'nwse-resize'\n | 'zoom-in'\n | 'zoom-out';\n\nexport type ITransform = {\n x: number;\n y: number;\n z: number;\n dx: number;\n dy: number;\n dz: number;\n scrollX: number;\n scrollY: number;\n scaleX: number;\n scaleY: number;\n scaleZ: number;\n angle: number;\n alpha: number;\n beta: number;\n scaleCenter: [number | string, number | string];\n anchor: [number | string, number | string]; // 基于AABB的锚点位置,用于简单的定位某些path\n anchor3d: [number | string, number | string, number] | [number | string, number | string]; // 3d的锚点位置\n postMatrix: IMatrix;\n};\n\nexport type IFillType = boolean | string | IColor;\nexport type IFillStyle = {\n fillOpacity: number;\n shadowBlur: number;\n shadowColor: string;\n shadowOffsetX: number;\n shadowOffsetY: number;\n fill: IFillType;\n};\n\nexport type ILayout = {\n alignSelf: 'auto' | 'flex-start' | 'flex-end' | 'center';\n};\n\nexport type IBorderStyle = Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> & {\n distance: number | string;\n visible?: boolean;\n};\n\nexport type IStrokeType = boolean | string | IColor | null;\nexport type IStrokeStyle = {\n outerBorder: Partial<IBorderStyle>;\n innerBorder: Partial<IBorderStyle>;\n strokeOpacity: number;\n lineDash: number[];\n lineDashOffset: number;\n lineWidth: number;\n lineCap: CanvasLineCap;\n lineJoin: CanvasLineJoin;\n miterLimit: number;\n // 描边的boundsBuffer,用于控制bounds的buffer\n strokeBoundsBuffer: number;\n /**\n * stroke - true 全描边\n * stroke - false 不描边\n * stroke 为数值类型,适用于rect\\arc等图形,用于配置部分描边的场景,其中\n *\n * 0b00000 - 不描边\n * 0b000001 - top\n * 0b000010 - right\n * 0b000100 - bottom\n * 0b001000 - left\n * 相应的:\n * 0b000011 - top + right\n * 0b000111 - top + right + bottom\n * 0b001111 - 全描边\n *\n * stroke - boolean[],适用于rect\\arc等图形,用于配置部分描边的场景\n */\n stroke: IStrokeType[] | IStrokeType;\n};\n\ntype TextureType = 'circle' | 'diamond' | 'rect' | 'vertical-line' | 'horizontal-line' | 'bias-lr' | 'bias-rl' | 'grid';\n\nexport type IConnectedStyle = {\n // 连接,取零或者断开\n connectedType: 'connect' | 'zero' | 'none';\n connectedStyle: {\n stroke: IStrokeStyle['stroke'];\n strokeOpacity: IStrokeStyle['strokeOpacity'];\n lineDash: IStrokeStyle['lineDash'];\n lineDashOffset: IStrokeStyle['lineDashOffset'];\n lineCap: IStrokeStyle['lineCap'];\n lineJoin: IStrokeStyle['lineJoin'];\n lineWidth: IStrokeStyle['lineWidth'];\n fill: IFillStyle['fill'];\n fillOpacity: IFillStyle['fillOpacity'];\n };\n connectedX: number;\n connectedY: number;\n};\n\nexport type IBackgroundConfig = {\n stroke?: string | boolean;\n fill?: string | boolean;\n lineWidth?: number;\n cornerRadius?: number;\n expandX?: number;\n expandY?: number;\n};\n\ntype IBackgroundType = string | HTMLImageElement | HTMLCanvasElement | IBackgroundConfig;\n\nexport type IGraphicStyle = ILayout &\n IFillStyle &\n IStrokeStyle &\n IPickStyle & {\n opacity: number;\n backgroundMode: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'; // 填充模式(与具体图元有关)\n backgroundFit: boolean; // 是否正好填充,只在repeat-x或者repeat-y以及no-repeat的时候生效\n backgroundCornerRadius: number | number[];\n background:\n | IBackgroundType\n | {\n background: IBackgroundType;\n dx?: number;\n dy?: number;\n width?: number;\n height?: number;\n x?: number;\n y?: number;\n }\n | null; // 背景,可以与fill同时存在\n texture: TextureType | string; // 纹理\n textureColor: string; // 纹理颜色\n textureSize: number; // 纹理大小\n texturePadding: number; // 纹理间隙\n blur: number;\n cursor: Cursor | null; // 鼠标样式\n renderStyle?: 'default' | 'rough' | any;\n // HTML的dom或者string\n html: {\n dom: string | HTMLElement; // dom字符串或者dom\n container: string | HTMLElement | null; // id或者dom\n width: number; // 容器的宽度\n height: number; // 容器的高度\n style: string | Record<string, any>; // 容器的样式\n visible?: boolean;\n anchorType?: 'position' | 'boundsLeftTop';\n } | null;\n };\n\nexport type IPickStyle = {\n // 给stroke模式的pick额外加的buffer,用于外界控制stroke区域的pick范围\n pickStrokeBuffer: number;\n};\n\nexport type IDebugType = {\n _debug_bounds: boolean | ((c: any, g: any) => void);\n};\nexport type IGraphicAttribute = IDebugType &\n IGraphicStyle &\n ITransform & {\n /**\n * stroke百分比\n */\n strokeSeg: IStrokeSeg | null;\n // 包围盒的padding\n boundsPadding: number | number[];\n /**\n * 选择模式,精确模式,粗糙模式(包围盒模式),自定义模式\n */\n pickMode: 'accurate' | 'imprecise' | 'custom';\n boundsMode: 'accurate' | 'imprecise';\n customPickShape: () => boolean | null;\n /**\n * 是否支持事件拾取,默认为 true。\n * @default true\n */\n pickable: boolean;\n /**\n * 是否支持fill拾取,默认为 true。\n * @experimental\n * @default true\n */\n fillPickable: boolean;\n /**\n * 是否支持stroke拾取,默认为 true。\n * @experimental\n * @default true\n */\n strokePickable: boolean;\n /**\n * 对于 group 节点,是否支持其子元素的事件拾取,默认为 true。\n * 如果 group `pickable` 关闭,`childrenPickable` 开启,那么 group 的子节点仍参与事件拾取\n * @default true\n */\n childrenPickable: boolean;\n /**\n * 元素是否可见。\n * @default true\n */\n visible: boolean;\n zIndex: number;\n layout: any;\n /**\n * 是否在3d中控制方向\n * false: 不控制方向\n * true: 始终控制方向朝摄像机\n */\n keepDirIn3d?: boolean;\n shadowRootIdx: number;\n globalZIndex: number;\n globalCompositeOperation: CanvasRenderingContext2D['globalCompositeOperation'] | '';\n // 完全支持滚动 | 完全不支持滚动 | 支持x方向的滚动 | 支持y方向的滚动\n overflow: 'scroll' | 'hidden' | 'scroll-x' | 'scroll-y';\n };\n\nexport interface IGraphicJson<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>> {\n attribute: Partial<T>;\n _uid: number;\n type: string;\n name: string;\n children: IGraphicJson<T>[];\n}\n\n/** the context of setAttribute */\nexport type ISetAttributeContext = {\n /** type of setAttribute */\n type?: number;\n animationState?: {\n step?: IStep;\n isFirstFrameOfStep?: boolean;\n /** ratio of animation */\n ratio?: number;\n /** is animation end? */\n end?: boolean;\n };\n skipUpdateCallback?: boolean;\n};\n\nexport type IGraphicAnimateParams = {\n id?: number | string;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n};\n\nexport interface IGraphic<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>>\n extends INode,\n IAnimateTarget {\n type?: GraphicType;\n numberType?: number;\n stage?: IStage;\n layer?: ILayer;\n shadowRoot?: IShadowRoot;\n glyphHost?: IGraphic<IGlyphGraphicAttribute>;\n backgroundImg?: boolean;\n attachedThemeGraphic?: IGraphic<any>;\n\n bindDom?: Map<string | HTMLElement, { container: HTMLElement | string; dom: HTMLElement; wrapGroup: HTMLDivElement }>;\n\n valid: boolean;\n parent: IGroup | null;\n isContainer?: boolean;\n // 是否是3d模式(是否应用3d视角)\n in3dMode?: boolean;\n\n // 上次更新的stamp\n stamp?: number;\n animationBackUps?: {\n from: Record<string, any>;\n to: Record<string, any>;\n };\n\n attribute: Partial<T>;\n\n /** 用于实现morph动画场景,转换成bezier曲线渲染 */\n pathProxy?: ICustomPath2D | ((attrs: T) => ICustomPath2D);\n incremental?: number;\n incrementalAt?: number;\n\n /** 记录state对应的图形属性 */\n states?: Record<string, Partial<T>>;\n normalAttrs?: Partial<T>;\n stateProxy?: (stateName: string, targetStates?: string[]) => Partial<T>;\n findFace?: () => IFace3d;\n toggleState: (stateName: string, hasAnimation?: boolean) => void;\n removeState: (stateName: string, hasAnimation?: boolean) => void;\n clearStates: (hasAnimation?: boolean) => void;\n useStates: (states: string[], hasAnimation?: boolean) => void;\n addState: (stateName: string, keepCurrentStates?: boolean, hasAnimation?: boolean) => void;\n hasState: (stateName?: string) => boolean;\n getState: (stateName: string) => Partial<T>;\n onBeforeAttributeUpdate?: (\n val: any,\n attributes: Partial<T>,\n key: null | string | string[],\n context?: ISetAttributeContext\n ) => T | undefined;\n applyStateAttrs: (attrs: Partial<T>, stateNames: string[], hasAnimation?: boolean, isClear?: boolean) => void;\n updateNormalAttrs: (stateAttrs: Partial<T>) => void;\n\n // get\n readonly AABBBounds: IAABBBounds; // 用于获取当前节点的AABB包围盒\n readonly OBBBounds: IOBBBounds; // 获取OBB包围盒,旋转防重叠需要用\n readonly globalAABBBounds: IAABBBounds; // 全局AABB包围盒\n readonly transMatrix: IMatrix; // 变换矩阵,动态计算\n readonly globalTransMatrix: IMatrix; // 变换矩阵,动态计算\n\n getOffsetXY: (attr?: ITransform) => IPoint;\n\n // function\n containsPoint: (x: number, y: number, mode?: IContainPointMode, picker?: IPickerService) => boolean;\n\n setMode: (mode: '3d' | '2d') => void;\n isValid: () => boolean;\n\n // TODO: transform API\n // 基于当前transform的变换,普通用户尽量别用,拿捏不住的~\n translate: (x: number, y: number) => this;\n translateTo: (x: number, y: number) => this;\n scale: (scaleX: number, scaleY: number, scaleCenter?: IPointLike) => this;\n scaleTo: (scaleX: number, scaleY: number) => this;\n rotate: (angle: number, rotateCenter?: IPointLike) => this;\n rotateTo: (angle: number) => this;\n skewTo: (b: number, c: number) => this;\n addUpdateBoundTag: () => void;\n addUpdateShapeAndBoundsTag: () => void;\n addUpdateLayoutTag: () => void;\n\n update: (d?: { bounds: boolean; trans: boolean }) => void;\n\n // animate\n animate: (params?: IGraphicAnimateParams) => IAnimate;\n\n // 语法糖,可有可无,有的为了首屏性能考虑做成get方法,有的由外界直接托管,内部不赋值\n name?: string;\n\n // 供render处理shape缓存tag\n shouldUpdateShape: () => boolean;\n clearUpdateShapeTag: () => void;\n\n // // 供render缓存shape\n // cacheShape?: ICustomPath2D;\n // // 线段使用的path2D\n // cacheLine?: ISegPath2D | ISegPath2D[];\n // // 面积图使用的path2D\n // cacheArea?: IAreaCacheItem | IAreaCacheItem[];\n\n setAttributes: (params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext) => void;\n\n initAttributes: (params: Partial<T>) => void;\n\n setAttribute: (key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) => void;\n\n setStage: (stage?: IStage, layer?: ILayer) => void;\n onSetStage: (cb: (g: IGraphic, stage: IStage) => void) => void;\n\n shouldUpdateAABBBounds: () => boolean;\n shouldSelfChangeUpdateAABBBounds: () => boolean;\n shouldUpdateGlobalMatrix: () => boolean;\n\n addUpdatePositionTag: () => void;\n addUpdateGlobalPositionTag: () => void;\n\n attachShadow: () => IShadowRoot;\n detachShadow: () => void;\n\n toJson: () => IGraphicJson;\n\n /** 创建pathProxy */\n createPathProxy: (path?: string) => void;\n /** 将图形转换成CustomPath2D */\n toCustomPath?: () => ICustomPath2D;\n\n resources?: Map<\n string | HTMLImageElement | HTMLCanvasElement | IBackgroundConfig,\n { state: 'init' | 'loading' | 'success' | 'fail'; data?: HTMLImageElement | HTMLCanvasElement }\n >;\n imageLoadSuccess: (url: string, data: HTMLImageElement) => void;\n imageLoadFail: (url: string) => void;\n\n clone: () => IGraphic;\n stopAnimates: (stopChildren?: boolean) => void;\n getNoWorkAnimateAttr: () => Record<string, number>;\n}\n\nexport interface IRoot extends IGraphic {\n pick: (x: number, y: number) => IGraphic;\n}\n\n/**\n * 动画配置\n */\nexport type IAnimateConfig = {\n duration?: number;\n easing?: EasingType;\n};\n\nexport type GraphicReleaseStatus = 'released' | 'willRelease';\n"]}
1
+ {"version":3,"sources":["../src/interface/graphic.ts"],"names":[],"mappings":"","file":"graphic.js","sourcesContent":["import type { IAABBBounds, IOBBBounds, IMatrix, IPointLike, IPoint } from '@visactor/vutils';\nimport type { IAnimate, IStep, EasingType, IAnimateTarget } from './animate';\nimport type { IColor } from './color';\nimport type { IGroup } from './graphic/group';\nimport type { IShadowRoot } from './graphic/shadow-root';\nimport type { ILayer } from './layer';\nimport type { INode } from './node-tree';\nimport type { ICustomPath2D } from './path';\nimport type { IStage } from './stage';\nimport type { IGlyphGraphicAttribute } from './graphic/glyph';\nimport type { IContainPointMode } from '../common/enums';\nimport type { IFace3d } from './graphic/face3d';\nimport type { IPickerService } from './picker';\nimport { ITheme } from './graphic/theme';\n\ntype IStrokeSeg = {\n start: number; // 百分比\n // end和length二选一\n end: number; // 百分比\n length: number; // 像素长度\n};\n\n// TODO 最后加一个any\nexport type GraphicType =\n | 'area'\n | 'circle'\n | 'ellipse'\n | 'line'\n | 'rect'\n | 'rect3d'\n | 'path'\n | 'richtext'\n | 'text'\n | 'arc'\n | 'arc3d'\n | 'image'\n | 'symbol'\n | 'group'\n | 'shadowroot'\n | 'polygon'\n | 'pyramid3d'\n | 'glyph';\n\n// Cursor style\n// See: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\nexport type Cursor =\n | 'auto'\n | 'default'\n | 'none'\n | 'context-menu'\n | 'help'\n | 'pointer'\n | 'progress'\n | 'wait'\n | 'cell'\n | 'crosshair'\n | 'text'\n | 'vertical-text'\n | 'alias'\n | 'copy'\n | 'move'\n | 'no-drop'\n | 'not-allowed'\n | 'grab'\n | 'grabbing'\n | 'all-scroll'\n | 'col-resize'\n | 'row-resize'\n | 'n-resize'\n | 'e-resize'\n | 's-resize'\n | 'w-resize'\n | 'ne-resize'\n | 'nw-resize'\n | 'se-resize'\n | 'sw-resize'\n | 'ew-resize'\n | 'ns-resize'\n | 'nesw-resize'\n | 'nwse-resize'\n | 'zoom-in'\n | 'zoom-out';\n\nexport type ITransform = {\n x: number;\n y: number;\n z: number;\n dx: number;\n dy: number;\n dz: number;\n scrollX: number;\n scrollY: number;\n scaleX: number;\n scaleY: number;\n scaleZ: number;\n angle: number;\n alpha: number;\n beta: number;\n scaleCenter: [number | string, number | string];\n anchor: [number | string, number | string]; // 基于AABB的锚点位置,用于简单的定位某些path\n anchor3d: [number | string, number | string, number] | [number | string, number | string]; // 3d的锚点位置\n postMatrix: IMatrix;\n};\n\nexport type IFillType = boolean | string | IColor;\nexport type IFillStyle = {\n fillOpacity: number;\n shadowBlur: number;\n shadowColor: string;\n shadowOffsetX: number;\n shadowOffsetY: number;\n fill: IFillType;\n};\n\nexport type ILayout = {\n alignSelf: 'auto' | 'flex-start' | 'flex-end' | 'center';\n};\n\nexport type IBorderStyle = Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> & {\n distance: number | string;\n visible?: boolean;\n};\n\nexport type IStrokeType = boolean | string | IColor | null;\nexport type IStrokeStyle = {\n outerBorder: Partial<IBorderStyle>;\n innerBorder: Partial<IBorderStyle>;\n strokeOpacity: number;\n lineDash: number[];\n lineDashOffset: number;\n lineWidth: number;\n lineCap: CanvasLineCap;\n lineJoin: CanvasLineJoin;\n miterLimit: number;\n // 描边的boundsBuffer,用于控制bounds的buffer\n strokeBoundsBuffer: number;\n /**\n * stroke - true 全描边\n * stroke - false 不描边\n * stroke 为数值类型,适用于rect\\arc等图形,用于配置部分描边的场景,其中\n *\n * 0b00000 - 不描边\n * 0b000001 - top\n * 0b000010 - right\n * 0b000100 - bottom\n * 0b001000 - left\n * 相应的:\n * 0b000011 - top + right\n * 0b000111 - top + right + bottom\n * 0b001111 - 全描边\n *\n * stroke - boolean[],适用于rect\\arc等图形,用于配置部分描边的场景\n */\n stroke: IStrokeType[] | IStrokeType;\n};\n\ntype TextureType = 'circle' | 'diamond' | 'rect' | 'vertical-line' | 'horizontal-line' | 'bias-lr' | 'bias-rl' | 'grid';\n\nexport type IConnectedStyle = {\n // 连接,取零或者断开\n connectedType: 'connect' | 'zero' | 'none';\n connectedStyle: {\n stroke: IStrokeStyle['stroke'];\n strokeOpacity: IStrokeStyle['strokeOpacity'];\n lineDash: IStrokeStyle['lineDash'];\n lineDashOffset: IStrokeStyle['lineDashOffset'];\n lineCap: IStrokeStyle['lineCap'];\n lineJoin: IStrokeStyle['lineJoin'];\n lineWidth: IStrokeStyle['lineWidth'];\n fill: IFillStyle['fill'];\n fillOpacity: IFillStyle['fillOpacity'];\n };\n connectedX: number;\n connectedY: number;\n};\n\nexport type IBackgroundConfig = {\n stroke?: string | boolean;\n fill?: string | boolean;\n lineWidth?: number;\n cornerRadius?: number;\n expandX?: number;\n expandY?: number;\n};\n\ntype IBackgroundType = string | HTMLImageElement | HTMLCanvasElement | IBackgroundConfig;\n\nexport type IGraphicStyle = ILayout &\n IFillStyle &\n IStrokeStyle &\n IPickStyle & {\n opacity: number;\n backgroundMode: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'; // 填充模式(与具体图元有关)\n backgroundFit: boolean; // 是否正好填充,只在repeat-x或者repeat-y以及no-repeat的时候生效\n backgroundCornerRadius: number | number[];\n background:\n | IBackgroundType\n | {\n background: IBackgroundType;\n dx?: number;\n dy?: number;\n width?: number;\n height?: number;\n x?: number;\n y?: number;\n }\n | null; // 背景,可以与fill同时存在\n texture: TextureType | string; // 纹理\n textureColor: string; // 纹理颜色\n textureSize: number; // 纹理大小\n texturePadding: number; // 纹理间隙\n blur: number;\n cursor: Cursor | null; // 鼠标样式\n // HTML的dom或者string\n html: {\n dom: string | HTMLElement; // dom字符串或者dom\n container: string | HTMLElement | null; // id或者dom\n width: number; // 容器的宽度\n height: number; // 容器的高度\n style: string | Record<string, any>; // 容器的样式\n visible?: boolean;\n anchorType?: 'position' | 'boundsLeftTop';\n } | null;\n };\n\nexport type IPickStyle = {\n // 给stroke模式的pick额外加的buffer,用于外界控制stroke区域的pick范围\n pickStrokeBuffer: number;\n};\n\nexport type IDebugType = {\n _debug_bounds: boolean | ((c: any, g: any) => void);\n};\nexport type IGraphicAttribute = IDebugType &\n IGraphicStyle &\n ITransform & {\n /**\n * stroke百分比\n */\n strokeSeg: IStrokeSeg | null;\n // 包围盒的padding\n boundsPadding: number | number[];\n /**\n * 选择模式,精确模式,粗糙模式(包围盒模式),自定义模式\n */\n pickMode: 'accurate' | 'imprecise' | 'custom';\n boundsMode: 'accurate' | 'imprecise';\n customPickShape: () => boolean | null;\n /**\n * 是否支持事件拾取,默认为 true。\n * @default true\n */\n pickable: boolean;\n /**\n * 是否支持fill拾取,默认为 true。\n * @experimental\n * @default true\n */\n fillPickable: boolean;\n /**\n * 是否支持stroke拾取,默认为 true。\n * @experimental\n * @default true\n */\n strokePickable: boolean;\n /**\n * 对于 group 节点,是否支持其子元素的事件拾取,默认为 true。\n * 如果 group `pickable` 关闭,`childrenPickable` 开启,那么 group 的子节点仍参与事件拾取\n * @default true\n */\n childrenPickable: boolean;\n /**\n * 元素是否可见。\n * @default true\n */\n visible: boolean;\n zIndex: number;\n layout: any;\n /**\n * 是否在3d中控制方向\n * false: 不控制方向\n * true: 始终控制方向朝摄像机\n */\n keepDirIn3d?: boolean;\n shadowRootIdx: number;\n globalZIndex: number;\n globalCompositeOperation: CanvasRenderingContext2D['globalCompositeOperation'] | '';\n // 完全支持滚动 | 完全不支持滚动 | 支持x方向的滚动 | 支持y方向的滚动\n overflow: 'scroll' | 'hidden' | 'scroll-x' | 'scroll-y';\n };\n\nexport interface IGraphicJson<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>> {\n attribute: Partial<T>;\n _uid: number;\n type: string;\n name: string;\n children: IGraphicJson<T>[];\n}\n\n/** the context of setAttribute */\nexport type ISetAttributeContext = {\n /** type of setAttribute */\n type?: number;\n animationState?: {\n step?: IStep;\n isFirstFrameOfStep?: boolean;\n /** ratio of animation */\n ratio?: number;\n /** is animation end? */\n end?: boolean;\n };\n skipUpdateCallback?: boolean;\n};\n\nexport type IGraphicAnimateParams = {\n id?: number | string;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n};\n\nexport interface IGraphic<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>>\n extends INode,\n IAnimateTarget {\n type?: GraphicType;\n numberType?: number;\n stage?: IStage;\n layer?: ILayer;\n shadowRoot?: IShadowRoot;\n glyphHost?: IGraphic<IGlyphGraphicAttribute>;\n backgroundImg?: boolean;\n attachedThemeGraphic?: IGraphic<any>;\n\n bindDom?: Map<string | HTMLElement, { container: HTMLElement | string; dom: HTMLElement; wrapGroup: HTMLDivElement }>;\n\n valid: boolean;\n parent: IGroup | null;\n isContainer?: boolean;\n // 是否是3d模式(是否应用3d视角)\n in3dMode?: boolean;\n\n // 上次更新的stamp\n stamp?: number;\n animationBackUps?: {\n from: Record<string, any>;\n to: Record<string, any>;\n };\n\n attribute: Partial<T>;\n\n /** 用于实现morph动画场景,转换成bezier曲线渲染 */\n pathProxy?: ICustomPath2D | ((attrs: T) => ICustomPath2D);\n incremental?: number;\n incrementalAt?: number;\n\n /** 记录state对应的图形属性 */\n states?: Record<string, Partial<T>>;\n normalAttrs?: Partial<T>;\n stateProxy?: (stateName: string, targetStates?: string[]) => Partial<T>;\n findFace?: () => IFace3d;\n toggleState: (stateName: string, hasAnimation?: boolean) => void;\n removeState: (stateName: string, hasAnimation?: boolean) => void;\n clearStates: (hasAnimation?: boolean) => void;\n useStates: (states: string[], hasAnimation?: boolean) => void;\n addState: (stateName: string, keepCurrentStates?: boolean, hasAnimation?: boolean) => void;\n hasState: (stateName?: string) => boolean;\n getState: (stateName: string) => Partial<T>;\n onBeforeAttributeUpdate?: (\n val: any,\n attributes: Partial<T>,\n key: null | string | string[],\n context?: ISetAttributeContext\n ) => T | undefined;\n applyStateAttrs: (attrs: Partial<T>, stateNames: string[], hasAnimation?: boolean, isClear?: boolean) => void;\n updateNormalAttrs: (stateAttrs: Partial<T>) => void;\n\n // get\n readonly AABBBounds: IAABBBounds; // 用于获取当前节点的AABB包围盒\n readonly OBBBounds: IOBBBounds; // 获取OBB包围盒,旋转防重叠需要用\n readonly globalAABBBounds: IAABBBounds; // 全局AABB包围盒\n readonly transMatrix: IMatrix; // 变换矩阵,动态计算\n readonly globalTransMatrix: IMatrix; // 变换矩阵,动态计算\n\n getOffsetXY: (attr?: ITransform) => IPoint;\n\n // function\n containsPoint: (x: number, y: number, mode?: IContainPointMode, picker?: IPickerService) => boolean;\n\n setMode: (mode: '3d' | '2d') => void;\n isValid: () => boolean;\n\n // TODO: transform API\n // 基于当前transform的变换,普通用户尽量别用,拿捏不住的~\n translate: (x: number, y: number) => this;\n translateTo: (x: number, y: number) => this;\n scale: (scaleX: number, scaleY: number, scaleCenter?: IPointLike) => this;\n scaleTo: (scaleX: number, scaleY: number) => this;\n rotate: (angle: number, rotateCenter?: IPointLike) => this;\n rotateTo: (angle: number) => this;\n skewTo: (b: number, c: number) => this;\n addUpdateBoundTag: () => void;\n addUpdateShapeAndBoundsTag: () => void;\n addUpdateLayoutTag: () => void;\n\n update: (d?: { bounds: boolean; trans: boolean }) => void;\n\n // animate\n animate: (params?: IGraphicAnimateParams) => IAnimate;\n\n // 语法糖,可有可无,有的为了首屏性能考虑做成get方法,有的由外界直接托管,内部不赋值\n name?: string;\n\n // 供render处理shape缓存tag\n shouldUpdateShape: () => boolean;\n clearUpdateShapeTag: () => void;\n\n // // 供render缓存shape\n // cacheShape?: ICustomPath2D;\n // // 线段使用的path2D\n // cacheLine?: ISegPath2D | ISegPath2D[];\n // // 面积图使用的path2D\n // cacheArea?: IAreaCacheItem | IAreaCacheItem[];\n\n setAttributes: (params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext) => void;\n\n initAttributes: (params: Partial<T>) => void;\n\n setAttribute: (key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) => void;\n\n setStage: (stage?: IStage, layer?: ILayer) => void;\n onSetStage: (cb: (g: IGraphic, stage: IStage) => void) => void;\n\n shouldUpdateAABBBounds: () => boolean;\n shouldSelfChangeUpdateAABBBounds: () => boolean;\n shouldUpdateGlobalMatrix: () => boolean;\n\n addUpdatePositionTag: () => void;\n addUpdateGlobalPositionTag: () => void;\n\n attachShadow: () => IShadowRoot;\n detachShadow: () => void;\n\n toJson: () => IGraphicJson;\n\n /** 创建pathProxy */\n createPathProxy: (path?: string) => void;\n /** 将图形转换成CustomPath2D */\n toCustomPath?: () => ICustomPath2D;\n\n resources?: Map<\n string | HTMLImageElement | HTMLCanvasElement | IBackgroundConfig,\n { state: 'init' | 'loading' | 'success' | 'fail'; data?: HTMLImageElement | HTMLCanvasElement }\n >;\n imageLoadSuccess: (url: string, data: HTMLImageElement) => void;\n imageLoadFail: (url: string) => void;\n\n clone: () => IGraphic;\n stopAnimates: (stopChildren?: boolean) => void;\n getNoWorkAnimateAttr: () => Record<string, number>;\n}\n\nexport interface IRoot extends IGraphic {\n pick: (x: number, y: number) => IGraphic;\n}\n\n/**\n * 动画配置\n */\nexport type IAnimateConfig = {\n duration?: number;\n easing?: EasingType;\n};\n\nexport type GraphicReleaseStatus = 'released' | 'willRelease';\n"]}
@@ -25,7 +25,7 @@ export declare class DefaultDrawContribution implements IDrawContribution {
25
25
  getRenderContribution(graphic: IGraphic): IGraphicRender | null;
26
26
  renderItem(graphic: IGraphic, drawContext: IDrawContext, params?: IGraphicRenderDrawParams): void;
27
27
  protected selectRenderByType(type?: string): IGraphicRender | null;
28
- protected selectRenderByNumberType(type: number, graphic: IGraphic): IGraphicRender | null;
28
+ protected selectRenderByNumberType(type?: number): IGraphicRender | null;
29
29
  protected clearScreen(renderService: IRenderService, context: IContext2d, drawContext: IDrawContext): void;
30
30
  afterDraw(renderService: IRenderService, drawParams: IDrawContext): void;
31
31
  }
@@ -145,7 +145,7 @@ let DefaultDrawContribution = class {
145
145
  }
146
146
  getRenderContribution(graphic) {
147
147
  let renderer;
148
- return renderer || (renderer = this.selectRenderByNumberType(graphic.numberType, graphic)),
148
+ return renderer || (renderer = this.selectRenderByNumberType(graphic.numberType)),
149
149
  renderer || (renderer = this.selectRenderByType(graphic.type)), renderer;
150
150
  }
151
151
  renderItem(graphic, drawContext, params) {
@@ -176,13 +176,8 @@ let DefaultDrawContribution = class {
176
176
  selectRenderByType(type) {
177
177
  return vutils_1.Logger.getInstance().warn("未知错误,不应该走到这里"), null;
178
178
  }
179
- selectRenderByNumberType(type, graphic) {
180
- let data;
181
- if (graphic.attribute.renderStyle) {
182
- const currentRenderMap = this.styleRenderMap.get(graphic.attribute.renderStyle);
183
- data = currentRenderMap && currentRenderMap.get(type);
184
- }
185
- return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
179
+ selectRenderByNumberType(type) {
180
+ return this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
186
181
  }
187
182
  clearScreen(renderService, context, drawContext) {
188
183
  var _a, _b;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/render/contributions/render/draw-contribution.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mEAAwF;AAgBxF,+CAAgE;AAEhE,iFAA6E;AAC7E,8CAAoD;AAEpD,6CAA2F;AAE3F,kDAA+C;AAC/C,qCAAsF;AACtF,yDAAyD;AACzD,+DAA2D;AAE3D,wEAAoE;AACpE,wEAAoE;AACpE,sDAAmD;AAM5C,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAclC,YAIiD,aAA+B,EAK3D,gCAAyF;QAL7D,kBAAa,GAAb,aAAa,CAAkB;QAK3D,qCAAgC,GAAhC,gCAAgC,CAAyD;QAE5G,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;QAClC,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;QAClC,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,IAAI,eAAM,EAAE,CAAC;QAChC,IAAI,CAAC,iBAAiB,GAAG,IAAI,eAAM,EAAE,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,yBAAW,CAAC,MAAM,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,yBAAW,CAAC,YAAY,CAAC;QAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,IAAI;QACF,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAChC,IAAI,IAAI,C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AtBlB,uBAAuB,CAganC;AAhaY,0DAAuB","file":"draw-contribution.js","sourcesContent":["import { injectable, inject, named, multiInject } from '../../../common/inversify-lite';\nimport type {\n IContext2d,\n MaybePromise,\n IGraphic,\n IGroup,\n IDrawContext,\n IRenderService,\n IGraphicRender,\n IGraphicRenderDrawParams,\n IContributionProvider,\n IDrawItemInterceptorContribution,\n IDrawContribution,\n IRenderSelector,\n IGlobal\n} from '../../../interface';\nimport { findNextGraphic, foreach } from '../../../common/sort';\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport { ContributionProvider } from '../../../common/contribution-provider';\nimport { DefaultAttribute } from '../../../graphic';\nimport type { IAABBBounds, IBounds, IBoundsLike, IMatrix, IMatrixLike } from '@visactor/vutils';\nimport { Bounds, Logger, getRectIntersect, isRectIntersect, last } from '@visactor/vutils';\nimport { LayerService } from '../../../core/constants';\nimport { container } from '../../../container';\nimport { GraphicRender, IncrementalDrawContribution, RenderSelector } from './symbol';\nimport { DrawItemInterceptor } from './draw-interceptor';\nimport { createColor } from '../../../common/canvas-utils';\nimport type { ILayerService } from '../../../interface/core';\nimport { boundsAllocate } from '../../../allocator/bounds-allocate';\nimport { matrixAllocate } from '../../../allocator/matrix-allocate';\nimport { application } from '../../../application';\n\n/**\n * 默认的渲染contribution,基于树状结构针对图元的渲染\n */\n@injectable()\nexport class DefaultDrawContribution implements IDrawContribution {\n declare currentRenderMap: Map<number, IGraphicRender>;\n declare defaultRenderMap: Map<number, IGraphicRender>;\n declare styleRenderMap: Map<string, Map<number, IGraphicRender>>;\n declare dirtyBounds: IBounds;\n declare backupDirtyBounds: IBounds;\n // 是否使用dirtyBounds\n declare useDirtyBounds: boolean;\n declare currentRenderService: IRenderService;\n declare InterceptorContributions: IDrawItemInterceptorContribution[];\n\n declare global: IGlobal;\n declare layerService: ILayerService;\n\n constructor(\n // @inject(ContributionProvider)\n // @named(GraphicRender)\n // protected readonly contributions: ContributionProvider<IGraphicRender>,\n @multiInject(GraphicRender) protected readonly contributions: IGraphicRender[],\n // @inject(RenderSelector) protected readonly renderSelector: IRenderSelector, // 根据图元类型选择对应的renderItem进行渲染\n // 拦截器\n @inject(ContributionProvider)\n @named(DrawItemInterceptor)\n protected readonly drawItemInterceptorContributions: IContributionProvider<IDrawItemInterceptorContribution>\n ) {\n this.currentRenderMap = new Map();\n this.defaultRenderMap = new Map();\n this.styleRenderMap = new Map();\n this.dirtyBounds = new Bounds();\n this.backupDirtyBounds = new Bounds();\n this.global = application.global;\n this.layerService = application.layerService;\n this.init();\n }\n\n init() {\n this.contributions.forEach(item => {\n if (item.style) {\n const map = this.styleRenderMap.get(item.style) || new Map();\n map.set(item.numberType, item);\n this.styleRenderMap.set(item.style, map);\n } else {\n this.defaultRenderMap.set(item.numberType, item);\n }\n });\n this.InterceptorContributions = this.drawItemInterceptorContributions\n .getContributions()\n .sort((a, b) => a.order - b.order);\n }\n\n prepareForDraw(renderService: IRenderService, drawContext: IDrawContext) {\n // 有dirtyBounds用dirtyBounds\n if (drawContext.updateBounds) {\n this.useDirtyBounds = true;\n } else {\n // 没有的话,看看是否需要跳过outRange的渲染\n this.useDirtyBounds = !drawContext.stage.params.optimize.disableCheckGraphicWidthOutRange;\n }\n }\n\n draw(renderService: IRenderService, drawContext: IDrawContext): MaybePromise<void> {\n this.prepareForDraw(renderService, drawContext);\n drawContext.drawContribution = this;\n this.currentRenderMap = this.styleRenderMap.get(drawContext.renderStyle) || this.defaultRenderMap;\n // this.startAtId = drawParams.startAtId;\n this.currentRenderService = renderService;\n // this.drawParams = drawParams;\n const { context, stage, x = 0, y = 0, width, height } = drawContext;\n\n if (!context) {\n return;\n }\n // 设置context的transform\n if (drawContext.keepMatrix) {\n if (context.nativeContext && context.nativeContext.getTransform) {\n const t = context.nativeContext.getTransform();\n context.setTransformFromMatrix(t, true, 1);\n }\n } else {\n context.inuse = true;\n // 初始化context\n context.clearMatrix();\n context.setTransformForCurrent(true);\n }\n\n const dirtyBounds: IBounds | undefined = this.dirtyBounds.setValue(0, 0, width, height);\n if (stage.dirtyBounds && !stage.dirtyBounds.empty()) {\n const b = getRectIntersect(dirtyBounds, stage.dirtyBounds, false);\n dirtyBounds.x1 = Math.floor(b.x1);\n dirtyBounds.y1 = Math.floor(b.y1);\n dirtyBounds.x2 = Math.ceil(b.x2);\n dirtyBounds.y2 = Math.ceil(b.y2);\n }\n // 如果dpr不是整数或者.5的小数,需要格式化dirtyBounds\n const d = context.dpr % 1;\n if (d || d !== 0.5) {\n dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr;\n dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr;\n dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr;\n dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr;\n }\n this.backupDirtyBounds.copy(dirtyBounds);\n\n const drawInArea =\n dirtyBounds.width() * context.dpr < context.canvas.width ||\n dirtyBounds.height() * context.dpr < context.canvas.height;\n context.save();\n\n // 设置translate\n context.translate(x, y, true);\n if (drawInArea) {\n context.beginPath();\n context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height());\n context.clip();\n }\n\n // 如果存在3d视角,那么不使用dirtyBounds\n if (stage.camera) {\n this.dirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n this.backupDirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n }\n\n this.clearScreen(renderService, context, drawContext);\n // // 渲染的时候图元的起始位置就是x,y\n // this.backupDirtyBounds.translate(-x, -y);\n // this.dirtyBounds.translate(-x, -y);\n\n // // 设置translate\n // context.translate(x, y, true);\n\n context.save();\n renderService.renderTreeRoots\n .sort((a, b) => {\n return (a.attribute.zIndex ?? DefaultAttribute.zIndex) - (b.attribute.zIndex ?? DefaultAttribute.zIndex);\n })\n .forEach(group => {\n group.isContainer\n ? this.renderGroup(group as IGroup, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0))\n : this.renderItem(group as IGraphic, drawContext);\n });\n\n context.restore();\n context.restore();\n context.draw();\n // this.break = false;\n if (!drawContext.keepMatrix) {\n context.inuse = false;\n }\n }\n\n doRegister() {\n throw new Error('暂不支持');\n }\n\n // 找到下一个graphic\n protected _findNextGraphic(group: IGroup): IGraphic | null {\n let parent = group.parent;\n let id = group._uid;\n while (parent) {\n const g = findNextGraphic(parent, id, DefaultAttribute.zIndex);\n if (g) {\n return g;\n }\n id = parent._uid;\n parent = parent.parent;\n }\n return null;\n }\n\n renderGroup(group: IGroup, drawContext: IDrawContext, parentMatrix: IMatrix, skipSort?: boolean) {\n if (drawContext.break || group.attribute.visibleAll === false) {\n return;\n }\n if (group.incremental && (drawContext.startAtId == null || drawContext.startAtId === group._uid)) {\n drawContext.break = true;\n this._increaseRender(group, drawContext);\n return;\n }\n\n if (this.useDirtyBounds && !isRectIntersect(group.AABBBounds, this.dirtyBounds, false)) {\n return;\n }\n\n let nextM: IMatrix = parentMatrix;\n let tempBounds: IBounds;\n\n if (this.useDirtyBounds) {\n tempBounds = boundsAllocate.allocateByObj(this.dirtyBounds);\n // 变换dirtyBounds\n const gm = group.transMatrix;\n nextM = matrixAllocate.allocateByObj(parentMatrix).multiply(gm.a, gm.b, gm.c, gm.d, gm.e, gm.f);\n // const m = group.globalTransMatrix.getInverse();\n this.dirtyBounds.copy(this.backupDirtyBounds).transformWithMatrix(nextM.getInverse());\n }\n\n this.renderItem(group, drawContext, {\n drawingCb: () => {\n skipSort\n ? group.forEachChildren((item: IGraphic) => {\n if (drawContext.break) {\n return;\n }\n if (item.isContainer) {\n this.renderGroup(item as IGroup, drawContext, nextM);\n } else {\n this.renderItem(item, drawContext);\n }\n })\n : foreach(\n group,\n DefaultAttribute.zIndex,\n (item: IGraphic) => {\n if (drawContext.break) {\n return;\n }\n if (item.isContainer) {\n this.renderGroup(item as IGroup, drawContext, nextM);\n } else {\n this.renderItem(item, drawContext);\n }\n },\n false,\n !!drawContext.context?.camera\n );\n }\n });\n\n if (this.useDirtyBounds) {\n this.dirtyBounds.copy(tempBounds);\n boundsAllocate.free(tempBounds);\n matrixAllocate.free(nextM);\n }\n }\n\n protected _increaseRender(group: IGroup, drawContext: IDrawContext) {\n const { layer, stage } = drawContext;\n const { subLayers } = layer;\n // 获取渐进渲染层\n let incrementalLayer = subLayers.get(group._uid);\n if (!incrementalLayer) {\n incrementalLayer = {\n layer: this.layerService.createLayer(stage),\n zIndex: subLayers.size,\n group\n };\n subLayers.set(group._uid, incrementalLayer);\n }\n // 渲染\n const incrementalContext = incrementalLayer.layer.getNativeHandler().getContext();\n const idc = incrementalLayer.drawContribution || container.get(IncrementalDrawContribution);\n idc.dirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n idc.backupDirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n (idc as any).draw(this.currentRenderService, {\n ...drawContext,\n drawContribution: idc,\n clear: 'transparent',\n layer: incrementalLayer.layer,\n context: incrementalContext,\n startAtId: group._uid,\n break: false\n });\n incrementalLayer.drawContribution = idc;\n // this.draw(this.currentRenderService, {...this.drawParams, startAtId: group._uid})\n // this.draw(this.currentRenderService, {...this.drawParams, clear: 'transparent', layer: incrementalContext.layer, context: incrementalContext, startAtId: group._uid})\n const nextGraphic = this._findNextGraphic(group);\n if (nextGraphic) {\n // 如果是下一个渐进渲染层,那就再来一次\n if (nextGraphic.isContainer && nextGraphic.incremental) {\n this._increaseRender(nextGraphic as IGroup, drawContext);\n } else {\n // 如果不是渐进渲染层,那就默认图层渲染\n let afterLayer = subLayers.get(nextGraphic._uid);\n if (!afterLayer) {\n afterLayer = {\n layer: this.layerService.createLayer(stage),\n zIndex: subLayers.size\n };\n subLayers.set(nextGraphic._uid, afterLayer);\n }\n const afterContext = afterLayer.layer.getNativeHandler().getContext();\n this.draw(this.currentRenderService, {\n ...drawContext,\n drawContribution: idc,\n clear: 'transparent',\n layer: afterLayer.layer,\n context: afterContext,\n startAtId: nextGraphic._uid,\n break: false\n });\n }\n }\n }\n\n getRenderContribution(graphic: IGraphic): IGraphicRender | null {\n let renderer;\n if (!renderer) {\n renderer = this.selectRenderByNumberType(graphic.numberType, graphic);\n }\n if (!renderer) {\n renderer = this.selectRenderByType(graphic.type);\n }\n return renderer;\n }\n\n renderItem(graphic: IGraphic, drawContext: IDrawContext, params?: IGraphicRenderDrawParams) {\n // 添加拦截器\n if (this.InterceptorContributions.length) {\n for (let i = 0; i < this.InterceptorContributions.length; i++) {\n const drawContribution = this.InterceptorContributions[i];\n if (\n drawContribution.beforeDrawItem &&\n drawContribution.beforeDrawItem(graphic, this.currentRenderService, drawContext, this, params)\n ) {\n return;\n }\n }\n }\n\n const renderer = this.getRenderContribution(graphic);\n if (!renderer) {\n return;\n }\n\n let retrans: boolean = false;\n let tempBounds: IAABBBounds;\n\n if (graphic.parent) {\n const { scrollX = 0, scrollY = 0 } = graphic.parent.attribute;\n retrans = !!(scrollX || scrollY);\n if (retrans) {\n tempBounds = this.dirtyBounds.clone();\n // 变换dirtyBounds\n const m = graphic.globalTransMatrix.getInverse();\n this.dirtyBounds.copy(this.backupDirtyBounds).transformWithMatrix(m);\n this.dirtyBounds.translate(-scrollX, -scrollY);\n }\n }\n\n if (this.useDirtyBounds && !(graphic.isContainer || isRectIntersect(graphic.AABBBounds, this.dirtyBounds, false))) {\n retrans && this.dirtyBounds.copy(tempBounds);\n return;\n }\n\n const skipDraw = drawContext.startAtId != null && graphic._uid !== drawContext.startAtId;\n if (graphic._uid === drawContext.startAtId) {\n drawContext.startAtId = null;\n }\n params && (params.skipDraw = skipDraw);\n if (skipDraw) {\n graphic.isContainer && renderer.draw(graphic, this.currentRenderService, drawContext, params);\n } else {\n renderer.draw(graphic, this.currentRenderService, drawContext, params);\n }\n\n retrans && this.dirtyBounds.copy(tempBounds);\n\n // 添加拦截器\n if (this.InterceptorContributions.length) {\n for (let i = 0; i < this.InterceptorContributions.length; i++) {\n const drawContribution = this.InterceptorContributions[i];\n if (drawContribution.afterDrawItem) {\n if (drawContribution.afterDrawItem(graphic, this.currentRenderService, drawContext, this)) {\n return;\n }\n }\n }\n }\n }\n // 根据type选择对应的render\n protected selectRenderByType(type?: string): IGraphicRender | null {\n Logger.getInstance().warn('未知错误,不应该走到这里');\n return null;\n }\n // 根据type选择对应的render\n protected selectRenderByNumberType(type: number, graphic: IGraphic): IGraphicRender | null {\n let data;\n if (graphic.attribute.renderStyle) {\n const currentRenderMap = this.styleRenderMap.get(graphic.attribute.renderStyle);\n data = currentRenderMap && currentRenderMap.get(type);\n }\n return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);\n }\n\n protected clearScreen(renderService: IRenderService, context: IContext2d, drawContext: IDrawContext) {\n const { clear } = drawContext;\n if (clear) {\n const canvas = context.getCanvas();\n const { width = canvas.width, height = canvas.height } = drawContext;\n const x = 0;\n const y = 0;\n context.clearRect(x, y, width, height);\n const stage = renderService.drawParams?.stage;\n stage && (context.globalAlpha = (stage as any).attribute.opacity ?? 1);\n if (stage && (stage as any).backgroundImg && (stage as any).resources) {\n const res = (stage as any).resources.get(clear);\n if (res && res.state === 'success' && res.data) {\n context.drawImage(res.data, x, y, width, height);\n }\n } else {\n context.fillStyle = createColor(\n context,\n clear,\n {\n AABBBounds: { x1: x, y1: y, x2: x + width, y2: y + height }\n },\n 0,\n 0\n );\n context.fillRect(x, y, width, height);\n }\n }\n }\n\n afterDraw(renderService: IRenderService, drawParams: IDrawContext) {\n return;\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/render/contributions/render/draw-contribution.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mEAAwF;AAgBxF,+CAAgE;AAEhE,iFAA6E;AAC7E,8CAAoD;AAEpD,6CAA2F;AAE3F,kDAA+C;AAC/C,qCAAsF;AACtF,yDAAyD;AACzD,+DAA2D;AAE3D,wEAAoE;AACpE,wEAAoE;AACpE,sDAAmD;AAM5C,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAclC,YAIiD,aA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AE,KAAK,EAAE,MAAM,CAAC,CAAC;aACvC;SACF;IACH,CAAC;IAED,SAAS,CAAC,aAA6B,EAAE,UAAwB;QAC/D,OAAO;IACT,CAAC;CACF,CAAA;AA5ZY,uBAAuB;IADnC,IAAA,2BAAU,GAAE;IAmBR,WAAA,IAAA,4BAAW,EAAC,sBAAa,CAAC,CAAA;IAG1B,WAAA,IAAA,uBAAM,EAAC,4CAAoB,CAAC,CAAA;IAC5B,WAAA,IAAA,sBAAK,EAAC,sCAAmB,CAAC,CAAA;;GAtBlB,uBAAuB,CA4ZnC;AA5ZY,0DAAuB","file":"draw-contribution.js","sourcesContent":["import { injectable, inject, named, multiInject } from '../../../common/inversify-lite';\nimport type {\n IContext2d,\n MaybePromise,\n IGraphic,\n IGroup,\n IDrawContext,\n IRenderService,\n IGraphicRender,\n IGraphicRenderDrawParams,\n IContributionProvider,\n IDrawItemInterceptorContribution,\n IDrawContribution,\n IRenderSelector,\n IGlobal\n} from '../../../interface';\nimport { findNextGraphic, foreach } from '../../../common/sort';\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport { ContributionProvider } from '../../../common/contribution-provider';\nimport { DefaultAttribute } from '../../../graphic';\nimport type { IAABBBounds, IBounds, IBoundsLike, IMatrix, IMatrixLike } from '@visactor/vutils';\nimport { Bounds, Logger, getRectIntersect, isRectIntersect, last } from '@visactor/vutils';\nimport { LayerService } from '../../../core/constants';\nimport { container } from '../../../container';\nimport { GraphicRender, IncrementalDrawContribution, RenderSelector } from './symbol';\nimport { DrawItemInterceptor } from './draw-interceptor';\nimport { createColor } from '../../../common/canvas-utils';\nimport type { ILayerService } from '../../../interface/core';\nimport { boundsAllocate } from '../../../allocator/bounds-allocate';\nimport { matrixAllocate } from '../../../allocator/matrix-allocate';\nimport { application } from '../../../application';\n\n/**\n * 默认的渲染contribution,基于树状结构针对图元的渲染\n */\n@injectable()\nexport class DefaultDrawContribution implements IDrawContribution {\n declare currentRenderMap: Map<number, IGraphicRender>;\n declare defaultRenderMap: Map<number, IGraphicRender>;\n declare styleRenderMap: Map<string, Map<number, IGraphicRender>>;\n declare dirtyBounds: IBounds;\n declare backupDirtyBounds: IBounds;\n // 是否使用dirtyBounds\n declare useDirtyBounds: boolean;\n declare currentRenderService: IRenderService;\n declare InterceptorContributions: IDrawItemInterceptorContribution[];\n\n declare global: IGlobal;\n declare layerService: ILayerService;\n\n constructor(\n // @inject(ContributionProvider)\n // @named(GraphicRender)\n // protected readonly contributions: ContributionProvider<IGraphicRender>,\n @multiInject(GraphicRender) protected readonly contributions: IGraphicRender[],\n // @inject(RenderSelector) protected readonly renderSelector: IRenderSelector, // 根据图元类型选择对应的renderItem进行渲染\n // 拦截器\n @inject(ContributionProvider)\n @named(DrawItemInterceptor)\n protected readonly drawItemInterceptorContributions: IContributionProvider<IDrawItemInterceptorContribution>\n ) {\n this.currentRenderMap = new Map();\n this.defaultRenderMap = new Map();\n this.styleRenderMap = new Map();\n this.dirtyBounds = new Bounds();\n this.backupDirtyBounds = new Bounds();\n this.global = application.global;\n this.layerService = application.layerService;\n this.init();\n }\n\n init() {\n this.contributions.forEach(item => {\n if (item.style) {\n const map = this.styleRenderMap.get(item.style) || new Map();\n map.set(item.numberType, item);\n this.styleRenderMap.set(item.style, map);\n } else {\n this.defaultRenderMap.set(item.numberType, item);\n }\n });\n this.InterceptorContributions = this.drawItemInterceptorContributions\n .getContributions()\n .sort((a, b) => a.order - b.order);\n }\n\n prepareForDraw(renderService: IRenderService, drawContext: IDrawContext) {\n // 有dirtyBounds用dirtyBounds\n if (drawContext.updateBounds) {\n this.useDirtyBounds = true;\n } else {\n // 没有的话,看看是否需要跳过outRange的渲染\n this.useDirtyBounds = !drawContext.stage.params.optimize.disableCheckGraphicWidthOutRange;\n }\n }\n\n draw(renderService: IRenderService, drawContext: IDrawContext): MaybePromise<void> {\n this.prepareForDraw(renderService, drawContext);\n drawContext.drawContribution = this;\n this.currentRenderMap = this.styleRenderMap.get(drawContext.renderStyle) || this.defaultRenderMap;\n // this.startAtId = drawParams.startAtId;\n this.currentRenderService = renderService;\n // this.drawParams = drawParams;\n const { context, stage, x = 0, y = 0, width, height } = drawContext;\n\n if (!context) {\n return;\n }\n // 设置context的transform\n if (drawContext.keepMatrix) {\n if (context.nativeContext && context.nativeContext.getTransform) {\n const t = context.nativeContext.getTransform();\n context.setTransformFromMatrix(t, true, 1);\n }\n } else {\n context.inuse = true;\n // 初始化context\n context.clearMatrix();\n context.setTransformForCurrent(true);\n }\n\n const dirtyBounds: IBounds | undefined = this.dirtyBounds.setValue(0, 0, width, height);\n if (stage.dirtyBounds && !stage.dirtyBounds.empty()) {\n const b = getRectIntersect(dirtyBounds, stage.dirtyBounds, false);\n dirtyBounds.x1 = Math.floor(b.x1);\n dirtyBounds.y1 = Math.floor(b.y1);\n dirtyBounds.x2 = Math.ceil(b.x2);\n dirtyBounds.y2 = Math.ceil(b.y2);\n }\n // 如果dpr不是整数或者.5的小数,需要格式化dirtyBounds\n const d = context.dpr % 1;\n if (d || d !== 0.5) {\n dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr;\n dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr;\n dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr;\n dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr;\n }\n this.backupDirtyBounds.copy(dirtyBounds);\n\n const drawInArea =\n dirtyBounds.width() * context.dpr < context.canvas.width ||\n dirtyBounds.height() * context.dpr < context.canvas.height;\n context.save();\n\n // 设置translate\n context.translate(x, y, true);\n if (drawInArea) {\n context.beginPath();\n context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height());\n context.clip();\n }\n\n // 如果存在3d视角,那么不使用dirtyBounds\n if (stage.camera) {\n this.dirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n this.backupDirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n }\n\n this.clearScreen(renderService, context, drawContext);\n // // 渲染的时候图元的起始位置就是x,y\n // this.backupDirtyBounds.translate(-x, -y);\n // this.dirtyBounds.translate(-x, -y);\n\n // // 设置translate\n // context.translate(x, y, true);\n\n context.save();\n renderService.renderTreeRoots\n .sort((a, b) => {\n return (a.attribute.zIndex ?? DefaultAttribute.zIndex) - (b.attribute.zIndex ?? DefaultAttribute.zIndex);\n })\n .forEach(group => {\n group.isContainer\n ? this.renderGroup(group as IGroup, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0))\n : this.renderItem(group as IGraphic, drawContext);\n });\n\n context.restore();\n context.restore();\n context.draw();\n // this.break = false;\n if (!drawContext.keepMatrix) {\n context.inuse = false;\n }\n }\n\n doRegister() {\n throw new Error('暂不支持');\n }\n\n // 找到下一个graphic\n protected _findNextGraphic(group: IGroup): IGraphic | null {\n let parent = group.parent;\n let id = group._uid;\n while (parent) {\n const g = findNextGraphic(parent, id, DefaultAttribute.zIndex);\n if (g) {\n return g;\n }\n id = parent._uid;\n parent = parent.parent;\n }\n return null;\n }\n\n renderGroup(group: IGroup, drawContext: IDrawContext, parentMatrix: IMatrix, skipSort?: boolean) {\n if (drawContext.break || group.attribute.visibleAll === false) {\n return;\n }\n if (group.incremental && (drawContext.startAtId == null || drawContext.startAtId === group._uid)) {\n drawContext.break = true;\n this._increaseRender(group, drawContext);\n return;\n }\n\n if (this.useDirtyBounds && !isRectIntersect(group.AABBBounds, this.dirtyBounds, false)) {\n return;\n }\n\n let nextM: IMatrix = parentMatrix;\n let tempBounds: IBounds;\n\n if (this.useDirtyBounds) {\n tempBounds = boundsAllocate.allocateByObj(this.dirtyBounds);\n // 变换dirtyBounds\n const gm = group.transMatrix;\n nextM = matrixAllocate.allocateByObj(parentMatrix).multiply(gm.a, gm.b, gm.c, gm.d, gm.e, gm.f);\n // const m = group.globalTransMatrix.getInverse();\n this.dirtyBounds.copy(this.backupDirtyBounds).transformWithMatrix(nextM.getInverse());\n }\n\n this.renderItem(group, drawContext, {\n drawingCb: () => {\n skipSort\n ? group.forEachChildren((item: IGraphic) => {\n if (drawContext.break) {\n return;\n }\n if (item.isContainer) {\n this.renderGroup(item as IGroup, drawContext, nextM);\n } else {\n this.renderItem(item, drawContext);\n }\n })\n : foreach(\n group,\n DefaultAttribute.zIndex,\n (item: IGraphic) => {\n if (drawContext.break) {\n return;\n }\n if (item.isContainer) {\n this.renderGroup(item as IGroup, drawContext, nextM);\n } else {\n this.renderItem(item, drawContext);\n }\n },\n false,\n !!drawContext.context?.camera\n );\n }\n });\n\n if (this.useDirtyBounds) {\n this.dirtyBounds.copy(tempBounds);\n boundsAllocate.free(tempBounds);\n matrixAllocate.free(nextM);\n }\n }\n\n protected _increaseRender(group: IGroup, drawContext: IDrawContext) {\n const { layer, stage } = drawContext;\n const { subLayers } = layer;\n // 获取渐进渲染层\n let incrementalLayer = subLayers.get(group._uid);\n if (!incrementalLayer) {\n incrementalLayer = {\n layer: this.layerService.createLayer(stage),\n zIndex: subLayers.size,\n group\n };\n subLayers.set(group._uid, incrementalLayer);\n }\n // 渲染\n const incrementalContext = incrementalLayer.layer.getNativeHandler().getContext();\n const idc = incrementalLayer.drawContribution || container.get(IncrementalDrawContribution);\n idc.dirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n idc.backupDirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n (idc as any).draw(this.currentRenderService, {\n ...drawContext,\n drawContribution: idc,\n clear: 'transparent',\n layer: incrementalLayer.layer,\n context: incrementalContext,\n startAtId: group._uid,\n break: false\n });\n incrementalLayer.drawContribution = idc;\n // this.draw(this.currentRenderService, {...this.drawParams, startAtId: group._uid})\n // this.draw(this.currentRenderService, {...this.drawParams, clear: 'transparent', layer: incrementalContext.layer, context: incrementalContext, startAtId: group._uid})\n const nextGraphic = this._findNextGraphic(group);\n if (nextGraphic) {\n // 如果是下一个渐进渲染层,那就再来一次\n if (nextGraphic.isContainer && nextGraphic.incremental) {\n this._increaseRender(nextGraphic as IGroup, drawContext);\n } else {\n // 如果不是渐进渲染层,那就默认图层渲染\n let afterLayer = subLayers.get(nextGraphic._uid);\n if (!afterLayer) {\n afterLayer = {\n layer: this.layerService.createLayer(stage),\n zIndex: subLayers.size\n };\n subLayers.set(nextGraphic._uid, afterLayer);\n }\n const afterContext = afterLayer.layer.getNativeHandler().getContext();\n this.draw(this.currentRenderService, {\n ...drawContext,\n drawContribution: idc,\n clear: 'transparent',\n layer: afterLayer.layer,\n context: afterContext,\n startAtId: nextGraphic._uid,\n break: false\n });\n }\n }\n }\n\n getRenderContribution(graphic: IGraphic): IGraphicRender | null {\n // let renderer = this.renderSelector.selector(graphic);\n let renderer;\n if (!renderer) {\n renderer = this.selectRenderByNumberType(graphic.numberType);\n }\n if (!renderer) {\n renderer = this.selectRenderByType(graphic.type);\n }\n return renderer;\n }\n\n renderItem(graphic: IGraphic, drawContext: IDrawContext, params?: IGraphicRenderDrawParams) {\n // 添加拦截器\n if (this.InterceptorContributions.length) {\n for (let i = 0; i < this.InterceptorContributions.length; i++) {\n const drawContribution = this.InterceptorContributions[i];\n if (\n drawContribution.beforeDrawItem &&\n drawContribution.beforeDrawItem(graphic, this.currentRenderService, drawContext, this, params)\n ) {\n return;\n }\n }\n }\n\n const renderer = this.getRenderContribution(graphic);\n if (!renderer) {\n return;\n }\n\n let retrans: boolean = false;\n let tempBounds: IAABBBounds;\n\n if (graphic.parent) {\n const { scrollX = 0, scrollY = 0 } = graphic.parent.attribute;\n retrans = !!(scrollX || scrollY);\n if (retrans) {\n tempBounds = this.dirtyBounds.clone();\n // 变换dirtyBounds\n const m = graphic.globalTransMatrix.getInverse();\n this.dirtyBounds.copy(this.backupDirtyBounds).transformWithMatrix(m);\n this.dirtyBounds.translate(-scrollX, -scrollY);\n }\n }\n\n if (this.useDirtyBounds && !(graphic.isContainer || isRectIntersect(graphic.AABBBounds, this.dirtyBounds, false))) {\n retrans && this.dirtyBounds.copy(tempBounds);\n return;\n }\n\n const skipDraw = drawContext.startAtId != null && graphic._uid !== drawContext.startAtId;\n if (graphic._uid === drawContext.startAtId) {\n drawContext.startAtId = null;\n }\n params && (params.skipDraw = skipDraw);\n if (skipDraw) {\n graphic.isContainer && renderer.draw(graphic, this.currentRenderService, drawContext, params);\n } else {\n renderer.draw(graphic, this.currentRenderService, drawContext, params);\n }\n\n retrans && this.dirtyBounds.copy(tempBounds);\n\n // 添加拦截器\n if (this.InterceptorContributions.length) {\n for (let i = 0; i < this.InterceptorContributions.length; i++) {\n const drawContribution = this.InterceptorContributions[i];\n if (drawContribution.afterDrawItem) {\n if (drawContribution.afterDrawItem(graphic, this.currentRenderService, drawContext, this)) {\n return;\n }\n }\n }\n }\n }\n // 根据type选择对应的render\n protected selectRenderByType(type?: string): IGraphicRender | null {\n Logger.getInstance().warn('未知错误,不应该走到这里');\n return null;\n }\n // 根据type选择对应的render\n protected selectRenderByNumberType(type?: number): IGraphicRender | null {\n return this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);\n }\n\n protected clearScreen(renderService: IRenderService, context: IContext2d, drawContext: IDrawContext) {\n const { clear } = drawContext;\n if (clear) {\n const canvas = context.getCanvas();\n const { width = canvas.width, height = canvas.height } = drawContext;\n const x = 0;\n const y = 0;\n context.clearRect(x, y, width, height);\n const stage = renderService.drawParams?.stage;\n stage && (context.globalAlpha = (stage as any).attribute.opacity ?? 1);\n if (stage && (stage as any).backgroundImg && (stage as any).resources) {\n const res = (stage as any).resources.get(clear);\n if (res && res.state === 'success' && res.data) {\n context.drawImage(res.data, x, y, width, height);\n }\n } else {\n context.fillStyle = createColor(\n context,\n clear,\n {\n AABBBounds: { x1: x, y1: y, x2: x + width, y2: y + height }\n },\n 0,\n 0\n );\n context.fillRect(x, y, width, height);\n }\n }\n }\n\n afterDraw(renderService: IRenderService, drawParams: IDrawContext) {\n return;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/render/contributions/render/module.ts"],"names":[],"mappings":";;AAAA,mEAAiE;AACjE,iFAAiF;AACjF,2DAA8D;AAC9D,iDAA0D;AAC1D,mFAAqF;AACrF,qCAAqH;AACrH,yDAAgG;AAChG,yDAAsG;AACtG,mDAIyB;AAEzB,kBAAe,IAAI,gCAAe,CAAC,IAAI,CAAC,EAAE;IACxC,IAAI,CAAC,uDAAuC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC1E,IAAI,CAAC,oDAAoC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEvE,IAAI,CAAC,yBAAgB,CAAC,CAAC,EAAE,CAAC,2CAAuB,CAAC,CAAC;IACnD,IAAI,CAAC,oCAA2B,CAAC,CAAC,EAAE,CAAC,kEAAkC,CAAC,CAAC;IAKzE,IAAI,CAAC,oBAAW,CAAC,CAAC,EAAE,CAAC,uCAAwB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAClE,IAAI,CAAC,sBAAa,CAAC,CAAC,SAAS,CAAC,oBAAW,CAAC,CAAC;IAG3C,IAAA,gDAAwB,EAAC,IAAI,EAAE,mCAAuB,CAAC,CAAC;IAGxD,IAAI,CAAC,wDAAwC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC3E,IAAA,gDAAwB,EAAC,IAAI,EAAE,4CAAgC,CAAC,CAAC;IACjE,IAAA,gDAAwB,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAC;IAK9C,IAAI,CAAC,wDAAqC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxE,IAAI,CAAC,sCAAmB,CAAC,CAAC,SAAS,CAAC,wDAAqC,CAAC,CAAC;IAM3E,IAAA,gDAAwB,EAAC,IAAI,EAAE,sCAAmB,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC","file":"module.js","sourcesContent":["import { ContainerModule } from '../../../common/inversify-lite';\nimport { bindContributionProvider } from '../../../common/contribution-provider';\nimport { DefaultDrawContribution } from './draw-contribution';\nimport { DefaultCanvasGroupRender } from './group-render';\nimport { DefaultIncrementalDrawContribution } from './incremental-draw-contribution';\nimport { DrawContribution, GraphicRender, GroupRender, IncrementalDrawContribution, RenderSelector } from './symbol';\nimport { CommonDrawItemInterceptorContribution, DrawItemInterceptor } from './draw-interceptor';\nimport { GroupRenderContribution, InteractiveSubRenderContribution } from './contributions/constants';\nimport {\n DefaultBaseBackgroundRenderContribution,\n DefaultBaseInteractiveRenderContribution,\n DefaultBaseTextureRenderContribution\n} from './contributions';\n\nexport default new ContainerModule(bind => {\n bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope();\n bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope();\n\n bind(DrawContribution).to(DefaultDrawContribution);\n bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution);\n\n // bind(RenderSelector).to(DefaultRenderSelector).inSingletonScope();\n\n // group渲染器\n bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope();\n bind(GraphicRender).toService(GroupRender);\n\n // group 渲染器注入contributions\n bindContributionProvider(bind, GroupRenderContribution);\n\n // 绑定通用interactive contribution\n bind(DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope();\n bindContributionProvider(bind, InteractiveSubRenderContribution);\n bindContributionProvider(bind, GraphicRender);\n\n // interceptor\n // bind(ShadowRootDrawItemInterceptorContribution).toSelf().inSingletonScope();\n // bind(DrawItemInterceptor).toService(ShadowRootDrawItemInterceptorContribution);\n bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope();\n bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution);\n // bind(RenderSelector).toService()\n // bind(Canvas3DDrawItemInterceptor).toSelf().inSingletonScope();\n // bind(DrawItemInterceptor).toService(Canvas3DDrawItemInterceptor);\n // bind(InteractiveDrawItemInterceptorContribution).toSelf().inSingletonScope();\n // bind(DrawItemInterceptor).toService(InteractiveDrawItemInterceptorContribution);\n bindContributionProvider(bind, DrawItemInterceptor);\n});\n"]}
1
+ {"version":3,"sources":["../src/render/contributions/render/module.ts"],"names":[],"mappings":";;AAAA,mEAAiE;AACjE,iFAAiF;AACjF,2DAA8D;AAC9D,iDAA0D;AAC1D,mFAAqF;AACrF,qCAAqG;AACrG,yDAAgG;AAChG,yDAAsG;AACtG,mDAIyB;AAEzB,kBAAe,IAAI,gCAAe,CAAC,IAAI,CAAC,EAAE;IACxC,IAAI,CAAC,uDAAuC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC1E,IAAI,CAAC,oDAAoC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEvE,IAAI,CAAC,yBAAgB,CAAC,CAAC,EAAE,CAAC,2CAAuB,CAAC,CAAC;IACnD,IAAI,CAAC,oCAA2B,CAAC,CAAC,EAAE,CAAC,kEAAkC,CAAC,CAAC;IAKzE,IAAI,CAAC,oBAAW,CAAC,CAAC,EAAE,CAAC,uCAAwB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAClE,IAAI,CAAC,sBAAa,CAAC,CAAC,SAAS,CAAC,oBAAW,CAAC,CAAC;IAG3C,IAAA,gDAAwB,EAAC,IAAI,EAAE,mCAAuB,CAAC,CAAC;IAGxD,IAAI,CAAC,wDAAwC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC3E,IAAA,gDAAwB,EAAC,IAAI,EAAE,4CAAgC,CAAC,CAAC;IACjE,IAAA,gDAAwB,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAC;IAK9C,IAAI,CAAC,wDAAqC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxE,IAAI,CAAC,sCAAmB,CAAC,CAAC,SAAS,CAAC,wDAAqC,CAAC,CAAC;IAK3E,IAAA,gDAAwB,EAAC,IAAI,EAAE,sCAAmB,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC","file":"module.js","sourcesContent":["import { ContainerModule } from '../../../common/inversify-lite';\nimport { bindContributionProvider } from '../../../common/contribution-provider';\nimport { DefaultDrawContribution } from './draw-contribution';\nimport { DefaultCanvasGroupRender } from './group-render';\nimport { DefaultIncrementalDrawContribution } from './incremental-draw-contribution';\nimport { DrawContribution, GraphicRender, GroupRender, IncrementalDrawContribution } from './symbol';\nimport { CommonDrawItemInterceptorContribution, DrawItemInterceptor } from './draw-interceptor';\nimport { GroupRenderContribution, InteractiveSubRenderContribution } from './contributions/constants';\nimport {\n DefaultBaseBackgroundRenderContribution,\n DefaultBaseInteractiveRenderContribution,\n DefaultBaseTextureRenderContribution\n} from './contributions';\n\nexport default new ContainerModule(bind => {\n bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope();\n bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope();\n\n bind(DrawContribution).to(DefaultDrawContribution);\n bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution);\n\n // bind(RenderSelector).to(DefaultRenderSelector).inSingletonScope();\n\n // group渲染器\n bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope();\n bind(GraphicRender).toService(GroupRender);\n\n // group 渲染器注入contributions\n bindContributionProvider(bind, GroupRenderContribution);\n\n // 绑定通用interactive contribution\n bind(DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope();\n bindContributionProvider(bind, InteractiveSubRenderContribution);\n bindContributionProvider(bind, GraphicRender);\n\n // interceptor\n // bind(ShadowRootDrawItemInterceptorContribution).toSelf().inSingletonScope();\n // bind(DrawItemInterceptor).toService(ShadowRootDrawItemInterceptorContribution);\n bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope();\n bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution);\n // bind(Canvas3DDrawItemInterceptor).toSelf().inSingletonScope();\n // bind(DrawItemInterceptor).toService(Canvas3DDrawItemInterceptor);\n // bind(InteractiveDrawItemInterceptorContribution).toSelf().inSingletonScope();\n // bind(DrawItemInterceptor).toService(InteractiveDrawItemInterceptorContribution);\n bindContributionProvider(bind, DrawItemInterceptor);\n});\n"]}
@@ -1,3 +1 @@
1
-
2
-
3
1
  //# sourceMappingURL=allocator-modules.js.map
@@ -6,5 +6,4 @@ export const DefaultStateAnimateConfig = {
6
6
  export const DefaultMorphingAnimateConfig = {
7
7
  duration: 1e3,
8
8
  easing: "quadInOut"
9
- };
10
- //# sourceMappingURL=config.js.map
9
+ };
@@ -21,7 +21,6 @@ export declare class CustomPath2D extends CurvePath implements ICustomPath2D {
21
21
  closePath(): this;
22
22
  addCurve(curve: ICurve<IPoint>): void;
23
23
  clear(): void;
24
- beginPath(): void;
25
24
  toString(): string;
26
25
  fromString(str: string, x?: number, y?: number, sX?: number, sY?: number): this;
27
26
  fromLine(line: ILine): void;
@@ -65,9 +65,6 @@ export class CustomPath2D extends CurvePath {
65
65
  clear() {
66
66
  this.transformCbList = null, this.commandList.length = 0, this.curves.length = 0;
67
67
  }
68
- beginPath() {
69
- this.clear();
70
- }
71
68
  toString() {
72
69
  if (!this.toStringCbList) {
73
70
  const list = [];
@@ -79,8 +76,7 @@ export class CustomPath2D extends CurvePath {
79
76
  let path = "";
80
77
  for (let i = 0; i < bezierPathList.length; i += 6) path += `C${bezierPathList[i]} ${bezierPathList[i + 1]} ${bezierPathList[i + 2]} ${bezierPathList[i + 3]} ${bezierPathList[i + 4]} ${bezierPathList[i + 5]}`;
81
78
  return path;
82
- }, list[enumCommandMap.R] = cmd => `M${cmd[1]} ${cmd[2]} h${cmd[3]} v${cmd[4]} H${cmd[1]}Z`,
83
- list[enumCommandMap.Z] = cmd => "Z", this.toStringCbList = list;
79
+ }, list[enumCommandMap.Z] = cmd => "Z", this.toStringCbList = list;
84
80
  }
85
81
  const list = this.toStringCbList;
86
82
  let path = "";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/custom-path2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACj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,EAAE,CAAC,EAAE;YAC9C,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAI,OAAO,CAAC,CAAC,CAAY,CAAC;SAC5D;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC","file":"custom-path2d.js","sourcesContent":["import { BoundsContext } from './bounds-context';\nimport type { CommandStrType, CommandType, ICurve, ICustomPath2D, IDirection, ILine, IPath2D } from '../interface';\nimport { CurvePath } from './segment/curve/path';\nimport { enumCommandMap, parseSvgPath } from './path-svg';\nimport type { IPoint, IPointLike } from '@visactor/vutils';\nimport { abs } from '@visactor/vutils';\nimport { Direction } from './enums';\nimport { drawArc, addArcToBezierPath } from './shape/arc';\nimport { renderCommandList } from './render-command-list';\nimport { calcLineCache } from './segment';\n\n/**\n * 部分源码参考 https://github.com/d3/d3-shape/\n * Copyright 2010-2022 Mike Bostock\n\n Permission to use, copy, modify, and/or distribute this software for any purpose\n with or without fee is hereby granted, provided that the above copyright notice\n and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n THIS SOFTWARE.\n */\n// 基于d3-shape重构\n// https://github.com/vega/vega/blob/master/packages/vega-scenegraph/src/path/render.js\n\nexport class CustomPath2D extends CurvePath implements ICustomPath2D {\n commandList: CommandType[] = [];\n _boundsContext: IPath2D;\n _ctx?: IPath2D;\n direction?: IDirection;\n protected transformCbList?: ((cmd: CommandType, x: number, y: number, sx: number, sy: number) => void)[];\n protected toStringCbList?: ((cmd: CommandType) => string)[];\n\n constructor(ctx?: IPath2D) {\n super();\n if (ctx) {\n this._ctx = ctx;\n }\n this._boundsContext = new BoundsContext(this.bounds);\n }\n\n setCtx(ctx?: IPath2D) {\n this._ctx = ctx;\n }\n\n moveTo(x: number, y: number) {\n this.commandList.push([enumCommandMap.M, x, y]);\n this._ctx && this._ctx.moveTo(x, y);\n return this;\n }\n lineTo(x: number, y: number) {\n this.commandList.push([enumCommandMap.L, x, y]);\n this._ctx && this._ctx.lineTo(x, y);\n return this;\n }\n quadraticCurveTo(aCPx: number, aCPy: number, aX: number, aY: number) {\n this.commandList.push([enumCommandMap.Q, aCPx, aCPy, aX, aY]);\n this._ctx && this._ctx.quadraticCurveTo(aCPx, aCPy, aX, aY);\n return this;\n }\n bezierCurveTo(aCP1x: number, aCP1y: number, aCP2x: number, aCP2y: number, aX: number, aY: number) {\n this.commandList.push([enumCommandMap.C, aCP1x, aCP1y, aCP2x, aCP2y, aX, aY]);\n this._ctx && this._ctx.bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY);\n return this;\n }\n arcTo(aX1: number, aY1: number, aX2: number, aY2: number, aRadius: number) {\n this.commandList.push([enumCommandMap.AT, aX1, aY1, aX2, aY2, aRadius]);\n this._ctx && this._ctx.arcTo(aX1, aY1, aX2, aY2, aRadius);\n return this;\n }\n ellipse(\n aX: number,\n aY: number,\n xRadius: number,\n yRadius: number,\n aRotation: number,\n aStartAngle: number,\n aEndAngle: number,\n aClockwise: boolean\n ) {\n this.commandList.push([enumCommandMap.E, aX, aY, xRadius, yRadius, aRotation, aStartAngle, aEndAngle, aClockwise]);\n this._ctx && this._ctx.ellipse(aX, aY, xRadius, yRadius, aRotation, aStartAngle, aEndAngle, aClockwise);\n return this;\n }\n rect(x: number, y: number, w: number, h: number) {\n this.commandList.push([enumCommandMap.R, x, y, w, h]);\n this._ctx && this._ctx.rect(x, y, w, h);\n return this;\n }\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean) {\n this.commandList.push([enumCommandMap.A, x, y, radius, startAngle, endAngle, counterclockwise]);\n this._ctx && this._ctx.arc(x, y, radius, startAngle, endAngle, counterclockwise);\n return this;\n }\n closePath() {\n this.commandList.push([enumCommandMap.Z]);\n this._ctx && this._ctx.closePath();\n return this;\n }\n\n addCurve(curve: ICurve<IPoint>) {\n this.curves.push(curve);\n // todo parse curve\n }\n clear() {\n this.transformCbList = null;\n this.commandList.length = 0;\n this.curves.length = 0;\n }\n\n beginPath() {\n this.clear();\n }\n\n toString(): string {\n if (!this.toStringCbList) {\n const list: ((cmd: CommandType) => string)[] = [];\n list[enumCommandMap.M] = (cmd: CommandType) => `M${cmd[1]} ${cmd[2]}`;\n list[enumCommandMap.L] = (cmd: CommandType) => `L${cmd[1]} ${cmd[2]}`;\n list[enumCommandMap.Q] = (cmd: CommandType) => `Q${cmd[1]} ${cmd[2]} ${cmd[3]} ${cmd[4]}`;\n list[enumCommandMap.C] = (cmd: CommandType) => `C${cmd[1]} ${cmd[2]} ${cmd[3]} ${cmd[4]} ${cmd[5]} ${cmd[6]}`;\n list[enumCommandMap.A] = (cmd: CommandType) => {\n const bezierPathList: number[] = [];\n addArcToBezierPath(\n bezierPathList,\n cmd[4] as number,\n cmd[5] as number,\n cmd[1] as number,\n cmd[2] as number,\n cmd[3] as number,\n cmd[3] as number\n );\n let path = '';\n for (let i = 0; i < bezierPathList.length; i += 6) {\n path += `C${bezierPathList[i]} ${bezierPathList[i + 1]} ${bezierPathList[i + 2]} ${bezierPathList[i + 3]} ${\n bezierPathList[i + 4]\n } ${bezierPathList[i + 5]}`;\n }\n return path;\n };\n // list[enumCommandMap.AT] = this.arcToTransform;\n // list[enumCommandMap.E] = this.ellipseTransform;\n list[enumCommandMap.R] = (cmd: CommandType) => `M${cmd[1]} ${cmd[2]} h${cmd[3]} v${cmd[4]} H${cmd[1]}Z`;\n // list[enumCommandMap.A] = this.arcTransform;\n list[enumCommandMap.Z] = (cmd: CommandType) => `Z`;\n this.toStringCbList = list;\n }\n\n const list = this.toStringCbList;\n let path = '';\n this.commandList.forEach(c => {\n path += list[c[0]](c);\n });\n return path;\n }\n\n fromString(str: string, x?: number, y?: number, sX?: number, sY?: number) {\n this.clear();\n\n // 解析path字符串\n const commandStrList = parseSvgPath(str) as CommandStrType[]; // TODO: 目前正则性能较差,后续需要加上回调函数供用户直接操作绘图命令\n this._runCommandStrList(commandStrList, x, y, sX, sY);\n\n // 更新bounds\n this._updateBounds();\n return this;\n }\n fromLine(line: ILine) {\n const { points, curveType, clipRangeByDimension } = line.attribute;\n if (!points) {\n return;\n }\n const cache = calcLineCache(points, curveType);\n if (clipRangeByDimension === 'x') {\n this.direction = Direction.ROW;\n } else if (clipRangeByDimension === 'y') {\n this.direction = Direction.COLUMN;\n } else if (clipRangeByDimension === 'auto') {\n this.direction = cache.direction;\n }\n this.curves = cache.curves;\n }\n fromCustomPath2D(path: ICustomPath2D, x?: number, y?: number, sX?: number, sY?: number) {\n this.clear();\n this._runCommandList(path.commandList as CommandType[], x, y, sX, sY);\n\n // 更新bounds\n this._updateBounds();\n return this;\n }\n transform(x: number, y: number, sx: number, sy: number) {\n const commandList = this.commandList;\n if (!this.transformCbList) {\n const list: ((cmd: CommandType, x: number, y: number, sx: number, sy: number) => void)[] = [];\n list[enumCommandMap.M] = this.moveToTransform;\n list[enumCommandMap.L] = this.lineToTransform;\n list[enumCommandMap.Q] = this.quadraticCurveToTransform;\n list[enumCommandMap.C] = this.bezierCurveToTransform;\n list[enumCommandMap.AT] = this.arcToTransform;\n list[enumCommandMap.E] = this.ellipseTransform;\n list[enumCommandMap.R] = this.rectTransform;\n list[enumCommandMap.A] = this.arcTransform;\n list[enumCommandMap.Z] = this.closePathTransform;\n this.transformCbList = list;\n }\n commandList.forEach(cmd => {\n this.transformCbList[cmd[0]](cmd, x, y, sx, sy);\n });\n this._updateBounds();\n }\n\n protected moveToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n }\n protected lineToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n }\n protected quadraticCurveToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx + x;\n cmd[4] = (cmd[4] as number) * sy + y;\n }\n protected bezierCurveToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx + x;\n cmd[4] = (cmd[4] as number) * sy + y;\n cmd[5] = (cmd[5] as number) * sx + x;\n cmd[6] = (cmd[6] as number) * sy + y;\n }\n arcToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx + x;\n cmd[4] = (cmd[4] as number) * sy + y;\n cmd[5] = ((cmd[5] as number) * (sx + sy)) / 2;\n }\n ellipseTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx;\n cmd[4] = (cmd[4] as number) * sy;\n }\n rectTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx;\n cmd[4] = (cmd[4] as number) * sy;\n }\n arcTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = ((cmd[3] as number) * (sx + sy)) / 2;\n }\n closePathTransform() {\n return;\n }\n protected _runCommandStrList(\n commandStrList: CommandStrType[],\n l: number = 0,\n t: number = 0,\n sX: number = 1,\n sY: number = 1\n ) {\n let current; // current instruction\n let previous = null;\n let x = 0; // current x\n let y = 0; // current y\n // let sX = 0;\n // let sY = 0;\n let controlX = 0; // current control point x\n let controlY = 0; // current control point y\n let tempX;\n let tempY;\n let tempControlX;\n let tempControlY;\n\n // if (isNil(l)) l = 0;\n // if (isNil(t)) t = 0;\n // if (isNil(sX)) sX = 1;\n // if (isNil(sY)) sY = sX;\n\n for (let i = 0, len = commandStrList.length; i < len; ++i) {\n current = commandStrList[i];\n if (sX !== 1 || sY !== 1) {\n current = scale(current, sX, sY);\n }\n\n switch (\n current[0] // first letter\n ) {\n case 'l': // lineto, relative\n x += current[1] as number;\n y += current[2] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'L': // lineto, absolute\n x = current[1] as number;\n y = current[2] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'h': // horizontal lineto, relative\n x += current[1] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'H': // horizontal lineto, absolute\n x = current[1] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'v': // vertical lineto, relative\n y += current[1] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'V': // verical lineto, absolute\n y = current[1] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'm': // moveTo, relative\n x += current[1] as number;\n y += current[2] as number;\n this.moveTo(x + l, y + t);\n break;\n\n case 'M': // moveTo, absolute\n x = current[1] as number;\n y = current[2] as number;\n this.moveTo(x + l, y + t);\n break;\n\n case 'c': // bezierCurveTo, relative\n tempX = x + (current[5] as number);\n tempY = y + (current[6] as number);\n controlX = x + (current[3] as number);\n controlY = y + (current[4] as number);\n this.bezierCurveTo(\n x + (current[1] as number) + l, // x1\n y + (current[2] as number) + t, // y1\n controlX + l, // x2\n controlY + t, // y2\n tempX + l,\n tempY + t\n );\n x = tempX;\n y = tempY;\n break;\n\n case 'C': // bezierCurveTo, absolute\n x = current[5] as number;\n y = current[6] as number;\n controlX = current[3] as number;\n controlY = current[4] as number;\n this.bezierCurveTo(\n (current[1] as number) + l,\n (current[2] as number) + t,\n controlX + l,\n controlY + t,\n x + l,\n y + t\n );\n break;\n\n case 's': // shorthand cubic bezierCurveTo, relative\n // transform to absolute x,y\n tempX = x + (current[3] as number);\n tempY = y + (current[4] as number);\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n this.bezierCurveTo(\n controlX + l,\n controlY + t,\n x + (current[1] as number) + l,\n y + (current[2] as number) + t,\n tempX + l,\n tempY + t\n );\n\n // set control point to 2nd one of this command\n // the first control point is assumed to be the reflection of\n // the second control point on the previous command relative\n // to the current point.\n controlX = x + (current[1] as number);\n controlY = y + (current[2] as number);\n\n x = tempX;\n y = tempY;\n break;\n\n case 'S': // shorthand cubic bezierCurveTo, absolute\n tempX = current[3] as number;\n tempY = current[4] as number;\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n this.bezierCurveTo(\n controlX + l,\n controlY + t,\n (current[1] as number) + l,\n (current[2] as number) + t,\n tempX + l,\n tempY + t\n );\n x = tempX;\n y = tempY;\n // set control point to 2nd one of this command\n // the first control point is assumed to be the reflection of\n // the second control point on the previous command relative\n // to the current point.\n controlX = current[1] as number;\n controlY = current[2] as number;\n\n break;\n\n case 'q': // quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + (current[3] as number);\n tempY = y + (current[4] as number);\n\n controlX = x + (current[1] as number);\n controlY = y + (current[2] as number);\n\n this.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'Q': // quadraticCurveTo, absolute\n tempX = current[3] as number;\n tempY = current[4] as number;\n\n this.quadraticCurveTo((current[1] as number) + l, (current[2] as number) + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n controlX = current[1] as number;\n controlY = current[2] as number;\n break;\n\n case 't': // shorthand quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + (current[1] as number);\n tempY = y + (current[2] as number);\n\n if ((previous![0] as string).match(/[QqTt]/) === null) {\n // If there is no previous command or if the previous command was not a Q, q, T or t,\n // assume the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else if (previous![0] === 't') {\n // calculate reflection of previous control points for t\n controlX = 2 * x - (tempControlX as number);\n controlY = 2 * y - (tempControlY as number);\n } else if (previous![0] === 'q') {\n // calculate reflection of previous control points for q\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n tempControlX = controlX;\n tempControlY = controlY;\n\n this.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n controlX = x + (current[1] as number);\n controlY = y + (current[2] as number);\n break;\n\n case 'T':\n tempX = current[1] as number;\n tempY = current[2] as number;\n\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n this.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'a':\n drawArc(this, x + l, y + t, [\n current[1] as number,\n current[2] as number,\n current[3] as number,\n current[4] as number,\n current[5] as number,\n (current[6] as number) + x + l,\n (current[7] as number) + y + t\n ]);\n x += current[6] as number;\n y += current[7] as number;\n break;\n\n case 'A':\n drawArc(this, x + l, y + t, [\n current[1] as number,\n current[2] as number,\n current[3] as number,\n current[4] as number,\n current[5] as number,\n (current[6] as number) + l,\n (current[7] as number) + t\n ]);\n x = current[6] as number;\n y = current[7] as number;\n break;\n\n case 'z':\n case 'Z':\n this.closePath();\n break;\n }\n previous = current;\n }\n }\n\n protected _runCommandList(commandList: CommandType[], l: number = 0, t: number = 0, sX: number = 1, sY: number = 1) {\n if (l === 0 && t === 0 && sX === 1 && sY === 1) {\n this.commandList = commandList.map(entry => entry.slice() as CommandType);\n return;\n }\n\n for (let i = 0, len = commandList.length; i < len; ++i) {\n const current = commandList[i].slice() as CommandType;\n\n switch (\n current[0] // first letter\n ) {\n case enumCommandMap.L:\n this.lineToTransform(current, l, t, sX, sY);\n break;\n\n case enumCommandMap.M:\n this.moveToTransform(current, l, t, sX, sY);\n break;\n\n case enumCommandMap.C:\n this.bezierCurveToTransform(current, l, t, sX, sY);\n break;\n\n case enumCommandMap.Q:\n this.quadraticCurveToTransform(current, l, t, sX, sY);\n break;\n\n case enumCommandMap.A:\n this.arcToTransform(current, l, t, sX, sY);\n break;\n case enumCommandMap.E:\n this.ellipseTransform(current, l, t, sX, sY);\n break;\n case enumCommandMap.R:\n this.rectTransform(current, l, t, sX, sY);\n break;\n case enumCommandMap.AT:\n this.arcToTransform(current, l, t, sX, sY);\n break;\n case enumCommandMap.Z:\n this.closePath();\n break;\n }\n }\n }\n private _updateBounds() {\n this.bounds.clear();\n renderCommandList(this.commandList, this._boundsContext as unknown as ICustomPath2D);\n }\n\n release(): void {\n this.commandList = [];\n this._boundsContext = null;\n this._ctx = null;\n }\n\n getLength(): number {\n if (this.direction === Direction.COLUMN) {\n if (!this.curves.length) {\n return 0;\n }\n const sc = this.curves[0];\n const ec = this.curves[this.curves.length - 1];\n return abs(sc.p0.y - ec.p1.y);\n } else if (this.direction === Direction.ROW) {\n if (!this.curves.length) {\n return 0;\n }\n const sc = this.curves[0];\n const ec = this.curves[this.curves.length - 1];\n return abs(sc.p0.x - ec.p1.x);\n }\n return this.curves.reduce((l, c) => l + c.getLength(), 0);\n }\n\n getAttrAt(distance: number): { pos: IPointLike; angle: number } {\n if (!this.curves) {\n return { pos: { x: 0, y: 0 }, angle: 0 };\n }\n let _dis = 0;\n let curve: ICurve<IPoint>;\n for (let i = 0; i < this.curves.length; i++) {\n curve = this.curves[i];\n const cl = curve.getLength(this.direction);\n if (_dis + cl >= distance) {\n break;\n } else {\n _dis += cl;\n }\n }\n const t = (distance - _dis) / curve.getLength(this.direction);\n const pos = curve.getPointAt(t);\n const angle = curve.getAngleAt(t);\n return { pos, angle };\n }\n}\n\nconst temp = ['l', 0, 0, 0, 0, 0, 0, 0];\n\nfunction scale(current: CommandStrType, sX: number, sY: number) {\n const c = (temp[0] = current[0]);\n if (c === 'a' || c === 'A') {\n temp[1] = sX * (current[1] as number);\n temp[2] = sY * (current[2] as number);\n temp[3] = current[3] as number;\n temp[4] = current[4] as number;\n temp[5] = current[5] as number;\n temp[6] = sX * (current[6] as number);\n temp[7] = sY * (current[7] as number);\n } else if (c === 'h' || c === 'H') {\n temp[1] = sX * (current[1] as number);\n } else if (c === 'v' || c === 'V') {\n temp[1] = sY * (current[1] as number);\n } else {\n for (let i = 1, n = current.length; i < n; ++i) {\n temp[i] = (i % 2 === 1 ? sX : sY) * (current[i] as number);\n }\n }\n return temp;\n}\n"]}
1
+ {"version":3,"sources":["../src/common/custom-path2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAqB1C,MAAM,OAAO,YAAa,SAAQ,SAAS;IAQzC,YAAY,GAAa;QACvB,KAAK,EAAE,CAAC;QARV,gBAAW,GAAkB,EAAE,CAAC;QAS9B,IAAI,GAAG,EAAE;YAC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I,CAAC,CAAC,CAAC,GAAG,EAAE,GAAI,OAAO,CAAC,CAAC,CAAY,CAAC;KACvC;SAAM,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE;QACjC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,GAAI,OAAO,CAAC,CAAC,CAAY,CAAC;KACvC;SAAM,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE;QACjC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,GAAI,OAAO,CAAC,CAAC,CAAY,CAAC;KACvC;SAAM;QACL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;YAC9C,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAI,OAAO,CAAC,CAAC,CAAY,CAAC;SAC5D;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC","file":"custom-path2d.js","sourcesContent":["import { BoundsContext } from './bounds-context';\nimport type { CommandStrType, CommandType, ICurve, ICustomPath2D, IDirection, ILine, IPath2D } from '../interface';\nimport { CurvePath } from './segment/curve/path';\nimport { enumCommandMap, parseSvgPath } from './path-svg';\nimport type { IPoint, IPointLike } from '@visactor/vutils';\nimport { abs } from '@visactor/vutils';\nimport { Direction } from './enums';\nimport { drawArc, addArcToBezierPath } from './shape/arc';\nimport { renderCommandList } from './render-command-list';\nimport { calcLineCache } from './segment';\n\n/**\n * 部分源码参考 https://github.com/d3/d3-shape/\n * Copyright 2010-2022 Mike Bostock\n\n Permission to use, copy, modify, and/or distribute this software for any purpose\n with or without fee is hereby granted, provided that the above copyright notice\n and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n THIS SOFTWARE.\n */\n// 基于d3-shape重构\n// https://github.com/vega/vega/blob/master/packages/vega-scenegraph/src/path/render.js\n\nexport class CustomPath2D extends CurvePath implements ICustomPath2D {\n commandList: CommandType[] = [];\n _boundsContext: IPath2D;\n _ctx?: IPath2D;\n direction?: IDirection;\n protected transformCbList?: ((cmd: CommandType, x: number, y: number, sx: number, sy: number) => void)[];\n protected toStringCbList?: ((cmd: CommandType) => string)[];\n\n constructor(ctx?: IPath2D) {\n super();\n if (ctx) {\n this._ctx = ctx;\n }\n this._boundsContext = new BoundsContext(this.bounds);\n }\n\n setCtx(ctx?: IPath2D) {\n this._ctx = ctx;\n }\n\n moveTo(x: number, y: number) {\n this.commandList.push([enumCommandMap.M, x, y]);\n this._ctx && this._ctx.moveTo(x, y);\n return this;\n }\n lineTo(x: number, y: number) {\n this.commandList.push([enumCommandMap.L, x, y]);\n this._ctx && this._ctx.lineTo(x, y);\n return this;\n }\n quadraticCurveTo(aCPx: number, aCPy: number, aX: number, aY: number) {\n this.commandList.push([enumCommandMap.Q, aCPx, aCPy, aX, aY]);\n this._ctx && this._ctx.quadraticCurveTo(aCPx, aCPy, aX, aY);\n return this;\n }\n bezierCurveTo(aCP1x: number, aCP1y: number, aCP2x: number, aCP2y: number, aX: number, aY: number) {\n this.commandList.push([enumCommandMap.C, aCP1x, aCP1y, aCP2x, aCP2y, aX, aY]);\n this._ctx && this._ctx.bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY);\n return this;\n }\n arcTo(aX1: number, aY1: number, aX2: number, aY2: number, aRadius: number) {\n this.commandList.push([enumCommandMap.AT, aX1, aY1, aX2, aY2, aRadius]);\n this._ctx && this._ctx.arcTo(aX1, aY1, aX2, aY2, aRadius);\n return this;\n }\n ellipse(\n aX: number,\n aY: number,\n xRadius: number,\n yRadius: number,\n aRotation: number,\n aStartAngle: number,\n aEndAngle: number,\n aClockwise: boolean\n ) {\n this.commandList.push([enumCommandMap.E, aX, aY, xRadius, yRadius, aRotation, aStartAngle, aEndAngle, aClockwise]);\n this._ctx && this._ctx.ellipse(aX, aY, xRadius, yRadius, aRotation, aStartAngle, aEndAngle, aClockwise);\n return this;\n }\n rect(x: number, y: number, w: number, h: number) {\n this.commandList.push([enumCommandMap.R, x, y, w, h]);\n this._ctx && this._ctx.rect(x, y, w, h);\n return this;\n }\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean) {\n this.commandList.push([enumCommandMap.A, x, y, radius, startAngle, endAngle, counterclockwise]);\n this._ctx && this._ctx.arc(x, y, radius, startAngle, endAngle, counterclockwise);\n return this;\n }\n closePath() {\n this.commandList.push([enumCommandMap.Z]);\n this._ctx && this._ctx.closePath();\n return this;\n }\n\n addCurve(curve: ICurve<IPoint>) {\n this.curves.push(curve);\n // todo parse curve\n }\n clear() {\n this.transformCbList = null;\n this.commandList.length = 0;\n this.curves.length = 0;\n }\n\n toString(): string {\n if (!this.toStringCbList) {\n const list: ((cmd: CommandType) => string)[] = [];\n list[enumCommandMap.M] = (cmd: CommandType) => `M${cmd[1]} ${cmd[2]}`;\n list[enumCommandMap.L] = (cmd: CommandType) => `L${cmd[1]} ${cmd[2]}`;\n list[enumCommandMap.Q] = (cmd: CommandType) => `Q${cmd[1]} ${cmd[2]} ${cmd[3]} ${cmd[4]}`;\n list[enumCommandMap.C] = (cmd: CommandType) => `C${cmd[1]} ${cmd[2]} ${cmd[3]} ${cmd[4]} ${cmd[5]} ${cmd[6]}`;\n list[enumCommandMap.A] = (cmd: CommandType) => {\n const bezierPathList: number[] = [];\n addArcToBezierPath(\n bezierPathList,\n cmd[4] as number,\n cmd[5] as number,\n cmd[1] as number,\n cmd[2] as number,\n cmd[3] as number,\n cmd[3] as number\n );\n let path = '';\n for (let i = 0; i < bezierPathList.length; i += 6) {\n path += `C${bezierPathList[i]} ${bezierPathList[i + 1]} ${bezierPathList[i + 2]} ${bezierPathList[i + 3]} ${\n bezierPathList[i + 4]\n } ${bezierPathList[i + 5]}`;\n }\n return path;\n };\n // list[enumCommandMap.AT] = this.arcToTransform;\n // list[enumCommandMap.E] = this.ellipseTransform;\n // list[enumCommandMap.R] = this.rectTransform;\n // list[enumCommandMap.A] = this.arcTransform;\n list[enumCommandMap.Z] = (cmd: CommandType) => `Z`;\n this.toStringCbList = list;\n }\n\n const list = this.toStringCbList;\n let path = '';\n this.commandList.forEach(c => {\n path += list[c[0]](c);\n });\n return path;\n }\n\n fromString(str: string, x?: number, y?: number, sX?: number, sY?: number) {\n this.clear();\n\n // 解析path字符串\n const commandStrList = parseSvgPath(str) as CommandStrType[]; // TODO: 目前正则性能较差,后续需要加上回调函数供用户直接操作绘图命令\n this._runCommandStrList(commandStrList, x, y, sX, sY);\n\n // 更新bounds\n this._updateBounds();\n return this;\n }\n fromLine(line: ILine) {\n const { points, curveType, clipRangeByDimension } = line.attribute;\n if (!points) {\n return;\n }\n const cache = calcLineCache(points, curveType);\n if (clipRangeByDimension === 'x') {\n this.direction = Direction.ROW;\n } else if (clipRangeByDimension === 'y') {\n this.direction = Direction.COLUMN;\n } else if (clipRangeByDimension === 'auto') {\n this.direction = cache.direction;\n }\n this.curves = cache.curves;\n }\n fromCustomPath2D(path: ICustomPath2D, x?: number, y?: number, sX?: number, sY?: number) {\n this.clear();\n this._runCommandList(path.commandList as CommandType[], x, y, sX, sY);\n\n // 更新bounds\n this._updateBounds();\n return this;\n }\n transform(x: number, y: number, sx: number, sy: number) {\n const commandList = this.commandList;\n if (!this.transformCbList) {\n const list: ((cmd: CommandType, x: number, y: number, sx: number, sy: number) => void)[] = [];\n list[enumCommandMap.M] = this.moveToTransform;\n list[enumCommandMap.L] = this.lineToTransform;\n list[enumCommandMap.Q] = this.quadraticCurveToTransform;\n list[enumCommandMap.C] = this.bezierCurveToTransform;\n list[enumCommandMap.AT] = this.arcToTransform;\n list[enumCommandMap.E] = this.ellipseTransform;\n list[enumCommandMap.R] = this.rectTransform;\n list[enumCommandMap.A] = this.arcTransform;\n list[enumCommandMap.Z] = this.closePathTransform;\n this.transformCbList = list;\n }\n commandList.forEach(cmd => {\n this.transformCbList[cmd[0]](cmd, x, y, sx, sy);\n });\n this._updateBounds();\n }\n\n protected moveToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n }\n protected lineToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n }\n protected quadraticCurveToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx + x;\n cmd[4] = (cmd[4] as number) * sy + y;\n }\n protected bezierCurveToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx + x;\n cmd[4] = (cmd[4] as number) * sy + y;\n cmd[5] = (cmd[5] as number) * sx + x;\n cmd[6] = (cmd[6] as number) * sy + y;\n }\n arcToTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx + x;\n cmd[4] = (cmd[4] as number) * sy + y;\n cmd[5] = ((cmd[5] as number) * (sx + sy)) / 2;\n }\n ellipseTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx;\n cmd[4] = (cmd[4] as number) * sy;\n }\n rectTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = (cmd[3] as number) * sx;\n cmd[4] = (cmd[4] as number) * sy;\n }\n arcTransform(cmd: CommandType, x: number, y: number, sx: number, sy: number) {\n cmd[1] = (cmd[1] as number) * sx + x;\n cmd[2] = (cmd[2] as number) * sy + y;\n cmd[3] = ((cmd[3] as number) * (sx + sy)) / 2;\n }\n closePathTransform() {\n return;\n }\n protected _runCommandStrList(\n commandStrList: CommandStrType[],\n l: number = 0,\n t: number = 0,\n sX: number = 1,\n sY: number = 1\n ) {\n let current; // current instruction\n let previous = null;\n let x = 0; // current x\n let y = 0; // current y\n // let sX = 0;\n // let sY = 0;\n let controlX = 0; // current control point x\n let controlY = 0; // current control point y\n let tempX;\n let tempY;\n let tempControlX;\n let tempControlY;\n\n // if (isNil(l)) l = 0;\n // if (isNil(t)) t = 0;\n // if (isNil(sX)) sX = 1;\n // if (isNil(sY)) sY = sX;\n\n for (let i = 0, len = commandStrList.length; i < len; ++i) {\n current = commandStrList[i];\n if (sX !== 1 || sY !== 1) {\n current = scale(current, sX, sY);\n }\n\n switch (\n current[0] // first letter\n ) {\n case 'l': // lineto, relative\n x += current[1] as number;\n y += current[2] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'L': // lineto, absolute\n x = current[1] as number;\n y = current[2] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'h': // horizontal lineto, relative\n x += current[1] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'H': // horizontal lineto, absolute\n x = current[1] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'v': // vertical lineto, relative\n y += current[1] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'V': // verical lineto, absolute\n y = current[1] as number;\n this.lineTo(x + l, y + t);\n break;\n\n case 'm': // moveTo, relative\n x += current[1] as number;\n y += current[2] as number;\n this.moveTo(x + l, y + t);\n break;\n\n case 'M': // moveTo, absolute\n x = current[1] as number;\n y = current[2] as number;\n this.moveTo(x + l, y + t);\n break;\n\n case 'c': // bezierCurveTo, relative\n tempX = x + (current[5] as number);\n tempY = y + (current[6] as number);\n controlX = x + (current[3] as number);\n controlY = y + (current[4] as number);\n this.bezierCurveTo(\n x + (current[1] as number) + l, // x1\n y + (current[2] as number) + t, // y1\n controlX + l, // x2\n controlY + t, // y2\n tempX + l,\n tempY + t\n );\n x = tempX;\n y = tempY;\n break;\n\n case 'C': // bezierCurveTo, absolute\n x = current[5] as number;\n y = current[6] as number;\n controlX = current[3] as number;\n controlY = current[4] as number;\n this.bezierCurveTo(\n (current[1] as number) + l,\n (current[2] as number) + t,\n controlX + l,\n controlY + t,\n x + l,\n y + t\n );\n break;\n\n case 's': // shorthand cubic bezierCurveTo, relative\n // transform to absolute x,y\n tempX = x + (current[3] as number);\n tempY = y + (current[4] as number);\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n this.bezierCurveTo(\n controlX + l,\n controlY + t,\n x + (current[1] as number) + l,\n y + (current[2] as number) + t,\n tempX + l,\n tempY + t\n );\n\n // set control point to 2nd one of this command\n // the first control point is assumed to be the reflection of\n // the second control point on the previous command relative\n // to the current point.\n controlX = x + (current[1] as number);\n controlY = y + (current[2] as number);\n\n x = tempX;\n y = tempY;\n break;\n\n case 'S': // shorthand cubic bezierCurveTo, absolute\n tempX = current[3] as number;\n tempY = current[4] as number;\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n this.bezierCurveTo(\n controlX + l,\n controlY + t,\n (current[1] as number) + l,\n (current[2] as number) + t,\n tempX + l,\n tempY + t\n );\n x = tempX;\n y = tempY;\n // set control point to 2nd one of this command\n // the first control point is assumed to be the reflection of\n // the second control point on the previous command relative\n // to the current point.\n controlX = current[1] as number;\n controlY = current[2] as number;\n\n break;\n\n case 'q': // quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + (current[3] as number);\n tempY = y + (current[4] as number);\n\n controlX = x + (current[1] as number);\n controlY = y + (current[2] as number);\n\n this.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'Q': // quadraticCurveTo, absolute\n tempX = current[3] as number;\n tempY = current[4] as number;\n\n this.quadraticCurveTo((current[1] as number) + l, (current[2] as number) + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n controlX = current[1] as number;\n controlY = current[2] as number;\n break;\n\n case 't': // shorthand quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + (current[1] as number);\n tempY = y + (current[2] as number);\n\n if ((previous![0] as string).match(/[QqTt]/) === null) {\n // If there is no previous command or if the previous command was not a Q, q, T or t,\n // assume the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else if (previous![0] === 't') {\n // calculate reflection of previous control points for t\n controlX = 2 * x - (tempControlX as number);\n controlY = 2 * y - (tempControlY as number);\n } else if (previous![0] === 'q') {\n // calculate reflection of previous control points for q\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n tempControlX = controlX;\n tempControlY = controlY;\n\n this.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n controlX = x + (current[1] as number);\n controlY = y + (current[2] as number);\n break;\n\n case 'T':\n tempX = current[1] as number;\n tempY = current[2] as number;\n\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n this.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'a':\n drawArc(this, x + l, y + t, [\n current[1] as number,\n current[2] as number,\n current[3] as number,\n current[4] as number,\n current[5] as number,\n (current[6] as number) + x + l,\n (current[7] as number) + y + t\n ]);\n x += current[6] as number;\n y += current[7] as number;\n break;\n\n case 'A':\n drawArc(this, x + l, y + t, [\n current[1] as number,\n current[2] as number,\n current[3] as number,\n current[4] as number,\n current[5] as number,\n (current[6] as number) + l,\n (current[7] as number) + t\n ]);\n x = current[6] as number;\n y = current[7] as number;\n break;\n\n case 'z':\n case 'Z':\n this.closePath();\n break;\n }\n previous = current;\n }\n }\n\n protected _runCommandList(commandList: CommandType[], l: number = 0, t: number = 0, sX: number = 1, sY: number = 1) {\n if (l === 0 && t === 0 && sX === 1 && sY === 1) {\n this.commandList = commandList.map(entry => entry.slice() as CommandType);\n return;\n }\n\n for (let i = 0, len = commandList.length; i < len; ++i) {\n const current = commandList[i].slice() as CommandType;\n\n switch (\n current[0] // first letter\n ) {\n case enumCommandMap.L:\n this.lineToTransform(current, l, t, sX, sY);\n break;\n\n case enumCommandMap.M:\n this.moveToTransform(current, l, t, sX, sY);\n break;\n\n case enumCommandMap.C:\n this.bezierCurveToTransform(current, l, t, sX, sY);\n break;\n\n case enumCommandMap.Q:\n this.quadraticCurveToTransform(current, l, t, sX, sY);\n break;\n\n case enumCommandMap.A:\n this.arcToTransform(current, l, t, sX, sY);\n break;\n case enumCommandMap.E:\n this.ellipseTransform(current, l, t, sX, sY);\n break;\n case enumCommandMap.R:\n this.rectTransform(current, l, t, sX, sY);\n break;\n case enumCommandMap.AT:\n this.arcToTransform(current, l, t, sX, sY);\n break;\n case enumCommandMap.Z:\n this.closePath();\n break;\n }\n }\n }\n private _updateBounds() {\n this.bounds.clear();\n renderCommandList(this.commandList, this._boundsContext as unknown as ICustomPath2D);\n }\n\n release(): void {\n this.commandList = [];\n this._boundsContext = null;\n this._ctx = null;\n }\n\n getLength(): number {\n if (this.direction === Direction.COLUMN) {\n if (!this.curves.length) {\n return 0;\n }\n const sc = this.curves[0];\n const ec = this.curves[this.curves.length - 1];\n return abs(sc.p0.y - ec.p1.y);\n } else if (this.direction === Direction.ROW) {\n if (!this.curves.length) {\n return 0;\n }\n const sc = this.curves[0];\n const ec = this.curves[this.curves.length - 1];\n return abs(sc.p0.x - ec.p1.x);\n }\n return this.curves.reduce((l, c) => l + c.getLength(), 0);\n }\n\n getAttrAt(distance: number): { pos: IPointLike; angle: number } {\n if (!this.curves) {\n return { pos: { x: 0, y: 0 }, angle: 0 };\n }\n let _dis = 0;\n let curve: ICurve<IPoint>;\n for (let i = 0; i < this.curves.length; i++) {\n curve = this.curves[i];\n const cl = curve.getLength(this.direction);\n if (_dis + cl >= distance) {\n break;\n } else {\n _dis += cl;\n }\n }\n const t = (distance - _dis) / curve.getLength(this.direction);\n const pos = curve.getPointAt(t);\n const angle = curve.getAngleAt(t);\n return { pos, angle };\n }\n}\n\nconst temp = ['l', 0, 0, 0, 0, 0, 0, 0];\n\nfunction scale(current: CommandStrType, sX: number, sY: number) {\n const c = (temp[0] = current[0]);\n if (c === 'a' || c === 'A') {\n temp[1] = sX * (current[1] as number);\n temp[2] = sY * (current[2] as number);\n temp[3] = current[3] as number;\n temp[4] = current[4] as number;\n temp[5] = current[5] as number;\n temp[6] = sX * (current[6] as number);\n temp[7] = sY * (current[7] as number);\n } else if (c === 'h' || c === 'H') {\n temp[1] = sX * (current[1] as number);\n } else if (c === 'v' || c === 'V') {\n temp[1] = sY * (current[1] as number);\n } else {\n for (let i = 1, n = current.length; i < n; ++i) {\n temp[i] = (i % 2 === 1 ? sX : sY) * (current[i] as number);\n }\n }\n return temp;\n}\n"]}
@@ -124,7 +124,6 @@ export const DefaultAttribute = Object.assign(Object.assign(Object.assign({
124
124
  zIndex: 0,
125
125
  layout: null,
126
126
  boundsPadding: 0,
127
- renderStyle: "default",
128
127
  pickMode: "accurate",
129
128
  customPickShape: null,
130
129
  boundsMode: "accurate",
@@ -245,7 +244,7 @@ export const DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}
245
244
  keepDirIn3d: !0
246
245
  });
247
246
 
248
- export const DefaultRichTextAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
247
+ export const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), {
249
248
  width: 300,
250
249
  height: 300,
251
250
  ellipsis: !0,