@visactor/vrender-kits 0.16.0-alpha.4 → 0.16.0-alpha.6
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.
- package/cjs/canvas/contributions/canvas-module.js +1 -0
- package/cjs/canvas/contributions/canvas-module.js.map +1 -0
- package/cjs/canvas/contributions/node/canvas.d.ts +1 -8
- package/cjs/canvas/contributions/node/canvas.js +0 -30
- package/cjs/canvas/contributions/node/canvas.js.map +1 -1
- package/cjs/canvas/contributions/node/context.d.ts +1 -7
- package/cjs/canvas/contributions/node/context.js +0 -29
- package/cjs/canvas/contributions/node/context.js.map +1 -1
- package/cjs/canvas/contributions/node/index.d.ts +1 -2
- package/cjs/canvas/contributions/node/index.js +0 -20
- package/cjs/canvas/contributions/node/index.js.map +1 -1
- package/cjs/canvas/contributions/node/modules.d.ts +1 -1
- package/cjs/canvas/contributions/node/modules.js +0 -9
- package/cjs/canvas/contributions/node/modules.js.map +1 -1
- package/cjs/canvas/index.d.ts +1 -1
- package/cjs/canvas/index.js +1 -21
- package/cjs/canvas/index.js.map +1 -1
- package/cjs/env/contributions/module.d.ts +1 -8
- package/cjs/env/contributions/module.js +1 -25
- package/cjs/env/contributions/module.js.map +1 -1
- package/cjs/env/contributions/node-contribution.d.ts +1 -49
- package/cjs/env/contributions/node-contribution.js +1 -95
- package/cjs/env/contributions/node-contribution.js.map +1 -1
- package/cjs/index-node.d.ts +2 -1
- package/cjs/index-node.js +1 -1
- package/cjs/index-node.js.map +1 -1
- package/cjs/index.d.ts +2 -5
- package/cjs/index.js +3 -18
- package/cjs/index.js.map +1 -1
- package/cjs/render/contributions/rough/config.js +1 -1
- package/cjs/render/contributions/rough/module.d.ts +1 -1
- package/cjs/render/contributions/rough/module.js +10 -10
- package/cjs/render/contributions/rough/module.js.map +1 -1
- package/cjs/render/contributions/rough/rough-arc.d.ts +1 -1
- package/cjs/render/contributions/rough/rough-arc.js +8 -10
- package/cjs/render/contributions/rough/rough-arc.js.map +1 -1
- package/cjs/render/contributions/rough/rough-area.d.ts +2 -2
- package/cjs/render/contributions/rough/rough-area.js +6 -6
- package/cjs/render/contributions/rough/rough-area.js.map +1 -1
- package/cjs/render/contributions/rough/rough-circle.d.ts +1 -1
- package/cjs/render/contributions/rough/rough-circle.js +6 -6
- package/cjs/render/contributions/rough/rough-circle.js.map +1 -1
- package/cjs/render/contributions/rough/rough-line.d.ts +2 -2
- package/cjs/render/contributions/rough/rough-line.js +6 -6
- package/cjs/render/contributions/rough/rough-line.js.map +1 -1
- package/cjs/render/contributions/rough/rough-path.d.ts +1 -1
- package/cjs/render/contributions/rough/rough-path.js +6 -6
- package/cjs/render/contributions/rough/rough-path.js.map +1 -1
- package/cjs/render/contributions/rough/rough-rect.d.ts +1 -1
- package/cjs/render/contributions/rough/rough-rect.js +6 -6
- package/cjs/render/contributions/rough/rough-rect.js.map +1 -1
- package/cjs/render/contributions/rough/rough-symbol.d.ts +2 -2
- package/cjs/render/contributions/rough/rough-symbol.js +8 -8
- package/cjs/render/contributions/rough/rough-symbol.js.map +1 -1
- package/cjs/window/contributions/modules.js +1 -0
- package/cjs/window/contributions/modules.js.map +1 -0
- package/cjs/window/contributions/node-contribution.d.ts +1 -40
- package/cjs/window/contributions/node-contribution.js +1 -111
- package/cjs/window/contributions/node-contribution.js.map +1 -1
- package/dist/index.js +44 -5702
- package/dist/index.min.js +1 -1
- package/es/canvas/contributions/canvas-module.d.ts +1 -0
- package/es/canvas/contributions/canvas-module.js +1 -0
- package/es/canvas/contributions/canvas-module.js.map +1 -0
- package/es/canvas/contributions/node/canvas.d.ts +1 -8
- package/es/canvas/contributions/node/canvas.js +0 -29
- package/es/canvas/contributions/node/canvas.js.map +1 -1
- package/es/canvas/contributions/node/context.d.ts +1 -7
- package/es/canvas/contributions/node/context.js +0 -28
- package/es/canvas/contributions/node/context.js.map +1 -1
- package/es/canvas/contributions/node/index.d.ts +1 -2
- package/es/canvas/contributions/node/index.js +0 -3
- package/es/canvas/contributions/node/index.js.map +1 -1
- package/es/canvas/contributions/node/modules.d.ts +1 -1
- package/es/canvas/contributions/node/modules.js +0 -7
- package/es/canvas/contributions/node/modules.js.map +1 -1
- package/es/canvas/index.d.ts +1 -1
- package/es/canvas/index.js +1 -2
- package/es/canvas/index.js.map +1 -1
- package/es/env/contributions/module.d.ts +1 -8
- package/es/env/contributions/module.js +1 -42
- package/es/env/contributions/module.js.map +1 -1
- package/es/env/contributions/node-contribution.d.ts +1 -49
- package/es/env/contributions/node-contribution.js +1 -90
- package/es/env/contributions/node-contribution.js.map +1 -1
- package/es/index-node.d.ts +2 -1
- package/es/index-node.js +2 -0
- package/es/index-node.js.map +1 -1
- package/es/index.d.ts +2 -5
- package/es/index.js +2 -8
- package/es/index.js.map +1 -1
- package/es/render/contributions/rough/config.js +1 -1
- package/es/render/contributions/rough/module.d.ts +1 -1
- package/es/render/contributions/rough/module.js +4 -2
- package/es/render/contributions/rough/module.js.map +1 -1
- package/es/render/contributions/rough/rough-arc.d.ts +1 -1
- package/es/render/contributions/rough/rough-arc.js +4 -3
- package/es/render/contributions/rough/rough-arc.js.map +1 -1
- package/es/render/contributions/rough/rough-area.d.ts +2 -2
- package/es/render/contributions/rough/rough-area.js +4 -2
- package/es/render/contributions/rough/rough-area.js.map +1 -1
- package/es/render/contributions/rough/rough-circle.d.ts +1 -1
- package/es/render/contributions/rough/rough-circle.js +4 -2
- package/es/render/contributions/rough/rough-circle.js.map +1 -1
- package/es/render/contributions/rough/rough-line.d.ts +2 -2
- package/es/render/contributions/rough/rough-line.js +4 -2
- package/es/render/contributions/rough/rough-line.js.map +1 -1
- package/es/render/contributions/rough/rough-path.d.ts +1 -1
- package/es/render/contributions/rough/rough-path.js +4 -2
- package/es/render/contributions/rough/rough-path.js.map +1 -1
- package/es/render/contributions/rough/rough-rect.d.ts +1 -1
- package/es/render/contributions/rough/rough-rect.js +4 -2
- package/es/render/contributions/rough/rough-rect.js.map +1 -1
- package/es/render/contributions/rough/rough-symbol.d.ts +2 -2
- package/es/render/contributions/rough/rough-symbol.js +4 -2
- package/es/render/contributions/rough/rough-symbol.js.map +1 -1
- package/es/window/contributions/modules.d.ts +1 -0
- package/es/window/contributions/modules.js +1 -0
- package/es/window/contributions/modules.js.map +1 -0
- package/es/window/contributions/node-contribution.d.ts +1 -40
- package/es/window/contributions/node-contribution.js +1 -109
- package/es/window/contributions/node-contribution.js.map +1 -1
- package/package.json +5 -3
- package/cjs/canvas/contributions/browser/canvas.d.ts +0 -17
- package/cjs/canvas/contributions/browser/canvas.js +0 -73
- package/cjs/canvas/contributions/browser/canvas.js.map +0 -1
- package/cjs/canvas/contributions/browser/context.d.ts +0 -175
- package/cjs/canvas/contributions/browser/context.js +0 -493
- package/cjs/canvas/contributions/browser/context.js.map +0 -1
- package/cjs/canvas/contributions/browser/index.d.ts +0 -2
- package/cjs/canvas/contributions/browser/index.js +0 -21
- package/cjs/canvas/contributions/browser/index.js.map +0 -1
- package/cjs/canvas/contributions/browser/modules.d.ts +0 -1
- package/cjs/canvas/contributions/browser/modules.js +0 -10
- package/cjs/canvas/contributions/browser/modules.js.map +0 -1
- package/cjs/canvas/contributions/create-canvas-module.d.ts +0 -2
- package/cjs/canvas/contributions/create-canvas-module.js +0 -17
- package/cjs/canvas/contributions/create-canvas-module.js.map +0 -1
- package/cjs/canvas/contributions/feishu/canvas.d.ts +0 -8
- package/cjs/canvas/contributions/feishu/canvas.js +0 -28
- package/cjs/canvas/contributions/feishu/canvas.js.map +0 -1
- package/cjs/canvas/contributions/feishu/context.d.ts +0 -12
- package/cjs/canvas/contributions/feishu/context.js +0 -56
- package/cjs/canvas/contributions/feishu/context.js.map +0 -1
- package/cjs/canvas/contributions/feishu/index.d.ts +0 -2
- package/cjs/canvas/contributions/feishu/index.js +0 -21
- package/cjs/canvas/contributions/feishu/index.js.map +0 -1
- package/cjs/canvas/contributions/feishu/modules.d.ts +0 -1
- package/cjs/canvas/contributions/feishu/modules.js +0 -10
- package/cjs/canvas/contributions/feishu/modules.js.map +0 -1
- package/cjs/canvas/contributions/lynx/canvas.d.ts +0 -8
- package/cjs/canvas/contributions/lynx/canvas.js +0 -29
- package/cjs/canvas/contributions/lynx/canvas.js.map +0 -1
- package/cjs/canvas/contributions/lynx/context.d.ts +0 -13
- package/cjs/canvas/contributions/lynx/context.js +0 -57
- package/cjs/canvas/contributions/lynx/context.js.map +0 -1
- package/cjs/canvas/contributions/lynx/index.d.ts +0 -2
- package/cjs/canvas/contributions/lynx/index.js +0 -21
- package/cjs/canvas/contributions/lynx/index.js.map +0 -1
- package/cjs/canvas/contributions/lynx/modules.d.ts +0 -1
- package/cjs/canvas/contributions/lynx/modules.js +0 -10
- package/cjs/canvas/contributions/lynx/modules.js.map +0 -1
- package/cjs/canvas/contributions/modules.d.ts +0 -9
- package/cjs/canvas/contributions/modules.js +0 -48
- package/cjs/canvas/contributions/modules.js.map +0 -1
- package/cjs/canvas/contributions/taro/canvas.d.ts +0 -8
- package/cjs/canvas/contributions/taro/canvas.js +0 -29
- package/cjs/canvas/contributions/taro/canvas.js.map +0 -1
- package/cjs/canvas/contributions/taro/context.d.ts +0 -32
- package/cjs/canvas/contributions/taro/context.js +0 -68
- package/cjs/canvas/contributions/taro/context.js.map +0 -1
- package/cjs/canvas/contributions/taro/index.d.ts +0 -2
- package/cjs/canvas/contributions/taro/index.js +0 -21
- package/cjs/canvas/contributions/taro/index.js.map +0 -1
- package/cjs/canvas/contributions/taro/modules.d.ts +0 -1
- package/cjs/canvas/contributions/taro/modules.js +0 -10
- package/cjs/canvas/contributions/taro/modules.js.map +0 -1
- package/cjs/canvas/contributions/tt/canvas.d.ts +0 -8
- package/cjs/canvas/contributions/tt/canvas.js +0 -29
- package/cjs/canvas/contributions/tt/canvas.js.map +0 -1
- package/cjs/canvas/contributions/tt/context.d.ts +0 -5
- package/cjs/canvas/contributions/tt/context.js +0 -19
- package/cjs/canvas/contributions/tt/context.js.map +0 -1
- package/cjs/canvas/contributions/tt/index.d.ts +0 -2
- package/cjs/canvas/contributions/tt/index.js +0 -21
- package/cjs/canvas/contributions/tt/index.js.map +0 -1
- package/cjs/canvas/contributions/tt/modules.d.ts +0 -1
- package/cjs/canvas/contributions/tt/modules.js +0 -10
- package/cjs/canvas/contributions/tt/modules.js.map +0 -1
- package/cjs/canvas/contributions/wx/canvas.d.ts +0 -8
- package/cjs/canvas/contributions/wx/canvas.js +0 -29
- package/cjs/canvas/contributions/wx/canvas.js.map +0 -1
- package/cjs/canvas/contributions/wx/context.d.ts +0 -7
- package/cjs/canvas/contributions/wx/context.js +0 -24
- package/cjs/canvas/contributions/wx/context.js.map +0 -1
- package/cjs/canvas/contributions/wx/index.d.ts +0 -2
- package/cjs/canvas/contributions/wx/index.js +0 -21
- package/cjs/canvas/contributions/wx/index.js.map +0 -1
- package/cjs/canvas/contributions/wx/modules.d.ts +0 -1
- package/cjs/canvas/contributions/wx/modules.js +0 -10
- package/cjs/canvas/contributions/wx/modules.js.map +0 -1
- package/cjs/env/all.d.ts +0 -4
- package/cjs/env/all.js +0 -27
- package/cjs/env/all.js.map +0 -1
- package/cjs/env/browser.d.ts +0 -3
- package/cjs/env/browser.js +0 -19
- package/cjs/env/browser.js.map +0 -1
- package/cjs/env/contributions/browser-contribution.d.ts +0 -42
- package/cjs/env/contributions/browser-contribution.js +0 -198
- package/cjs/env/contributions/browser-contribution.js.map +0 -1
- package/cjs/env/contributions/browser-module.d.ts +0 -2
- package/cjs/env/contributions/browser-module.js +0 -13
- package/cjs/env/contributions/browser-module.js.map +0 -1
- package/cjs/env/contributions/feishu-contribution.d.ts +0 -41
- package/cjs/env/contributions/feishu-contribution.js +0 -116
- package/cjs/env/contributions/feishu-contribution.js.map +0 -1
- package/cjs/env/contributions/feishu-module.d.ts +0 -2
- package/cjs/env/contributions/feishu-module.js +0 -12
- package/cjs/env/contributions/feishu-module.js.map +0 -1
- package/cjs/env/contributions/lynx-contribution.d.ts +0 -41
- package/cjs/env/contributions/lynx-contribution.js +0 -136
- package/cjs/env/contributions/lynx-contribution.js.map +0 -1
- package/cjs/env/contributions/taro-contribution.d.ts +0 -57
- package/cjs/env/contributions/taro-contribution.js +0 -142
- package/cjs/env/contributions/taro-contribution.js.map +0 -1
- package/cjs/env/contributions/wx-contribution.d.ts +0 -40
- package/cjs/env/contributions/wx-contribution.js +0 -131
- package/cjs/env/contributions/wx-contribution.js.map +0 -1
- package/cjs/env/feishu.d.ts +0 -3
- package/cjs/env/feishu.js +0 -19
- package/cjs/env/feishu.js.map +0 -1
- package/cjs/env/index.d.ts +0 -7
- package/cjs/env/index.js +0 -24
- package/cjs/env/index.js.map +0 -1
- package/cjs/env/lynx.d.ts +0 -3
- package/cjs/env/lynx.js +0 -19
- package/cjs/env/lynx.js.map +0 -1
- package/cjs/env/node.d.ts +0 -3
- package/cjs/env/node.js +0 -19
- package/cjs/env/node.js.map +0 -1
- package/cjs/env/taro.d.ts +0 -3
- package/cjs/env/taro.js +0 -19
- package/cjs/env/taro.js.map +0 -1
- package/cjs/env/wx.d.ts +0 -3
- package/cjs/env/wx.js +0 -19
- package/cjs/env/wx.js.map +0 -1
- package/cjs/event/extension/drag.d.ts +0 -9
- package/cjs/event/extension/drag.js +0 -53
- package/cjs/event/extension/drag.js.map +0 -1
- package/cjs/event/extension/gesture.d.ts +0 -38
- package/cjs/event/extension/gesture.js +0 -181
- package/cjs/event/extension/gesture.js.map +0 -1
- package/cjs/event/extension/index.d.ts +0 -3
- package/cjs/event/extension/index.js +0 -24
- package/cjs/event/extension/index.js.map +0 -1
- package/cjs/jsx/graphicType.d.ts +0 -171
- package/cjs/jsx/graphicType.js +0 -133
- package/cjs/jsx/graphicType.js.map +0 -1
- package/cjs/jsx/index.d.ts +0 -2
- package/cjs/jsx/index.js +0 -21
- package/cjs/jsx/index.js.map +0 -1
- package/cjs/jsx/jsx-classic.d.ts +0 -3
- package/cjs/jsx/jsx-classic.js +0 -58
- package/cjs/jsx/jsx-classic.js.map +0 -1
- package/cjs/picker/canvas-module.d.ts +0 -4
- package/cjs/picker/canvas-module.js +0 -23
- package/cjs/picker/canvas-module.js.map +0 -1
- package/cjs/picker/canvas-picker-service.d.ts +0 -28
- package/cjs/picker/canvas-picker-service.js +0 -91
- package/cjs/picker/canvas-picker-service.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/arc-picker.d.ts +0 -9
- package/cjs/picker/contributions/canvas-picker/arc-picker.js +0 -51
- package/cjs/picker/contributions/canvas-picker/arc-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/arc3d-picker.d.ts +0 -10
- package/cjs/picker/contributions/canvas-picker/arc3d-picker.js +0 -50
- package/cjs/picker/contributions/canvas-picker/arc3d-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/area-picker.d.ts +0 -9
- package/cjs/picker/contributions/canvas-picker/area-picker.js +0 -45
- package/cjs/picker/contributions/canvas-picker/area-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/base-picker.d.ts +0 -4
- package/cjs/picker/contributions/canvas-picker/base-picker.js +0 -18
- package/cjs/picker/contributions/canvas-picker/base-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/circle-picker.d.ts +0 -9
- package/cjs/picker/contributions/canvas-picker/circle-picker.js +0 -50
- package/cjs/picker/contributions/canvas-picker/circle-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/glyph-picker.d.ts +0 -9
- package/cjs/picker/contributions/canvas-picker/glyph-picker.js +0 -46
- package/cjs/picker/contributions/canvas-picker/glyph-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/group-picker.d.ts +0 -7
- package/cjs/picker/contributions/canvas-picker/group-picker.js +0 -26
- package/cjs/picker/contributions/canvas-picker/group-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/image-picker.d.ts +0 -7
- package/cjs/picker/contributions/canvas-picker/image-picker.js +0 -27
- package/cjs/picker/contributions/canvas-picker/image-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/line-picker.d.ts +0 -10
- package/cjs/picker/contributions/canvas-picker/line-picker.js +0 -56
- package/cjs/picker/contributions/canvas-picker/line-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/module.d.ts +0 -3
- package/cjs/picker/contributions/canvas-picker/module.js +0 -46
- package/cjs/picker/contributions/canvas-picker/module.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/path-picker.d.ts +0 -10
- package/cjs/picker/contributions/canvas-picker/path-picker.js +0 -57
- package/cjs/picker/contributions/canvas-picker/path-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/polygon-picker.d.ts +0 -9
- package/cjs/picker/contributions/canvas-picker/polygon-picker.js +0 -49
- package/cjs/picker/contributions/canvas-picker/polygon-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/pyramid3d-picker.d.ts +0 -10
- package/cjs/picker/contributions/canvas-picker/pyramid3d-picker.js +0 -51
- package/cjs/picker/contributions/canvas-picker/pyramid3d-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/rect-picker.d.ts +0 -9
- package/cjs/picker/contributions/canvas-picker/rect-picker.js +0 -62
- package/cjs/picker/contributions/canvas-picker/rect-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/rect3d-picker.d.ts +0 -10
- package/cjs/picker/contributions/canvas-picker/rect3d-picker.js +0 -50
- package/cjs/picker/contributions/canvas-picker/rect3d-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/richtext-picker.d.ts +0 -9
- package/cjs/picker/contributions/canvas-picker/richtext-picker.js +0 -33
- package/cjs/picker/contributions/canvas-picker/richtext-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/symbol-picker.d.ts +0 -10
- package/cjs/picker/contributions/canvas-picker/symbol-picker.js +0 -59
- package/cjs/picker/contributions/canvas-picker/symbol-picker.js.map +0 -1
- package/cjs/picker/contributions/canvas-picker/text-picker.d.ts +0 -10
- package/cjs/picker/contributions/canvas-picker/text-picker.js +0 -58
- package/cjs/picker/contributions/canvas-picker/text-picker.js.map +0 -1
- package/cjs/picker/contributions/constants.d.ts +0 -29
- package/cjs/picker/contributions/constants.js +0 -21
- package/cjs/picker/contributions/constants.js.map +0 -1
- package/cjs/picker/contributions/math-picker/arc-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/arc-picker.js +0 -51
- package/cjs/picker/contributions/math-picker/arc-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/area-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/area-picker.js +0 -45
- package/cjs/picker/contributions/math-picker/area-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/circle-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/circle-picker.js +0 -50
- package/cjs/picker/contributions/math-picker/circle-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/glyph-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/glyph-picker.js +0 -44
- package/cjs/picker/contributions/math-picker/glyph-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/line-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/line-picker.js +0 -50
- package/cjs/picker/contributions/math-picker/line-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/module.d.ts +0 -3
- package/cjs/picker/contributions/math-picker/module.js +0 -32
- package/cjs/picker/contributions/math-picker/module.js.map +0 -1
- package/cjs/picker/contributions/math-picker/path-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/path-picker.js +0 -50
- package/cjs/picker/contributions/math-picker/path-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/polygon-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/polygon-picker.js +0 -49
- package/cjs/picker/contributions/math-picker/polygon-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/rect-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/rect-picker.js +0 -62
- package/cjs/picker/contributions/math-picker/rect-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/symbol-picker.d.ts +0 -9
- package/cjs/picker/contributions/math-picker/symbol-picker.js +0 -50
- package/cjs/picker/contributions/math-picker/symbol-picker.js.map +0 -1
- package/cjs/picker/contributions/math-picker/text-picker.d.ts +0 -7
- package/cjs/picker/contributions/math-picker/text-picker.js +0 -26
- package/cjs/picker/contributions/math-picker/text-picker.js.map +0 -1
- package/cjs/picker/index.d.ts +0 -1
- package/cjs/picker/index.js +0 -21
- package/cjs/picker/index.js.map +0 -1
- package/cjs/picker/math-module.d.ts +0 -4
- package/cjs/picker/math-module.js +0 -23
- package/cjs/picker/math-module.js.map +0 -1
- package/cjs/picker/math-picker-service.d.ts +0 -16
- package/cjs/picker/math-picker-service.js +0 -54
- package/cjs/picker/math-picker-service.js.map +0 -1
- package/cjs/picker/module.d.ts +0 -6
- package/cjs/picker/module.js +0 -30
- package/cjs/picker/module.js.map +0 -1
- package/cjs/window/contributions/browser-contribution.d.ts +0 -49
- package/cjs/window/contributions/browser-contribution.js +0 -178
- package/cjs/window/contributions/browser-contribution.js.map +0 -1
- package/cjs/window/contributions/feishu-contribution.d.ts +0 -47
- package/cjs/window/contributions/feishu-contribution.js +0 -159
- package/cjs/window/contributions/feishu-contribution.js.map +0 -1
- package/cjs/window/contributions/lynx-contribution.d.ts +0 -47
- package/cjs/window/contributions/lynx-contribution.js +0 -159
- package/cjs/window/contributions/lynx-contribution.js.map +0 -1
- package/cjs/window/contributions/native-contribution.js +0 -1
- package/cjs/window/contributions/native-contribution.js.map +0 -1
- package/cjs/window/contributions/taro-contribution.d.ts +0 -47
- package/cjs/window/contributions/taro-contribution.js +0 -166
- package/cjs/window/contributions/taro-contribution.js.map +0 -1
- package/cjs/window/contributions/wx-contribution.d.ts +0 -47
- package/cjs/window/contributions/wx-contribution.js +0 -161
- package/cjs/window/contributions/wx-contribution.js.map +0 -1
- package/es/canvas/contributions/browser/canvas.d.ts +0 -17
- package/es/canvas/contributions/browser/canvas.js +0 -70
- package/es/canvas/contributions/browser/canvas.js.map +0 -1
- package/es/canvas/contributions/browser/context.d.ts +0 -175
- package/es/canvas/contributions/browser/context.js +0 -488
- package/es/canvas/contributions/browser/context.js.map +0 -1
- package/es/canvas/contributions/browser/index.d.ts +0 -2
- package/es/canvas/contributions/browser/index.js +0 -4
- package/es/canvas/contributions/browser/index.js.map +0 -1
- package/es/canvas/contributions/browser/modules.d.ts +0 -1
- package/es/canvas/contributions/browser/modules.js +0 -8
- package/es/canvas/contributions/browser/modules.js.map +0 -1
- package/es/canvas/contributions/create-canvas-module.d.ts +0 -2
- package/es/canvas/contributions/create-canvas-module.js +0 -9
- package/es/canvas/contributions/create-canvas-module.js.map +0 -1
- package/es/canvas/contributions/feishu/canvas.d.ts +0 -8
- package/es/canvas/contributions/feishu/canvas.js +0 -25
- package/es/canvas/contributions/feishu/canvas.js.map +0 -1
- package/es/canvas/contributions/feishu/context.d.ts +0 -12
- package/es/canvas/contributions/feishu/context.js +0 -53
- package/es/canvas/contributions/feishu/context.js.map +0 -1
- package/es/canvas/contributions/feishu/index.d.ts +0 -2
- package/es/canvas/contributions/feishu/index.js +0 -4
- package/es/canvas/contributions/feishu/index.js.map +0 -1
- package/es/canvas/contributions/feishu/modules.d.ts +0 -1
- package/es/canvas/contributions/feishu/modules.js +0 -8
- package/es/canvas/contributions/feishu/modules.js.map +0 -1
- package/es/canvas/contributions/lynx/canvas.d.ts +0 -8
- package/es/canvas/contributions/lynx/canvas.js +0 -26
- package/es/canvas/contributions/lynx/canvas.js.map +0 -1
- package/es/canvas/contributions/lynx/context.d.ts +0 -13
- package/es/canvas/contributions/lynx/context.js +0 -54
- package/es/canvas/contributions/lynx/context.js.map +0 -1
- package/es/canvas/contributions/lynx/index.d.ts +0 -2
- package/es/canvas/contributions/lynx/index.js +0 -4
- package/es/canvas/contributions/lynx/index.js.map +0 -1
- package/es/canvas/contributions/lynx/modules.d.ts +0 -1
- package/es/canvas/contributions/lynx/modules.js +0 -8
- package/es/canvas/contributions/lynx/modules.js.map +0 -1
- package/es/canvas/contributions/modules.d.ts +0 -9
- package/es/canvas/contributions/modules.js +0 -48
- package/es/canvas/contributions/modules.js.map +0 -1
- package/es/canvas/contributions/taro/canvas.d.ts +0 -8
- package/es/canvas/contributions/taro/canvas.js +0 -28
- package/es/canvas/contributions/taro/canvas.js.map +0 -1
- package/es/canvas/contributions/taro/context.d.ts +0 -32
- package/es/canvas/contributions/taro/context.js +0 -64
- package/es/canvas/contributions/taro/context.js.map +0 -1
- package/es/canvas/contributions/taro/index.d.ts +0 -2
- package/es/canvas/contributions/taro/index.js +0 -4
- package/es/canvas/contributions/taro/index.js.map +0 -1
- package/es/canvas/contributions/taro/modules.d.ts +0 -1
- package/es/canvas/contributions/taro/modules.js +0 -8
- package/es/canvas/contributions/taro/modules.js.map +0 -1
- package/es/canvas/contributions/tt/canvas.d.ts +0 -8
- package/es/canvas/contributions/tt/canvas.js +0 -26
- package/es/canvas/contributions/tt/canvas.js.map +0 -1
- package/es/canvas/contributions/tt/context.d.ts +0 -5
- package/es/canvas/contributions/tt/context.js +0 -16
- package/es/canvas/contributions/tt/context.js.map +0 -1
- package/es/canvas/contributions/tt/index.d.ts +0 -2
- package/es/canvas/contributions/tt/index.js +0 -4
- package/es/canvas/contributions/tt/index.js.map +0 -1
- package/es/canvas/contributions/tt/modules.d.ts +0 -1
- package/es/canvas/contributions/tt/modules.js +0 -8
- package/es/canvas/contributions/tt/modules.js.map +0 -1
- package/es/canvas/contributions/wx/canvas.d.ts +0 -8
- package/es/canvas/contributions/wx/canvas.js +0 -26
- package/es/canvas/contributions/wx/canvas.js.map +0 -1
- package/es/canvas/contributions/wx/context.d.ts +0 -7
- package/es/canvas/contributions/wx/context.js +0 -21
- package/es/canvas/contributions/wx/context.js.map +0 -1
- package/es/canvas/contributions/wx/index.d.ts +0 -2
- package/es/canvas/contributions/wx/index.js +0 -4
- package/es/canvas/contributions/wx/index.js.map +0 -1
- package/es/canvas/contributions/wx/modules.d.ts +0 -1
- package/es/canvas/contributions/wx/modules.js +0 -8
- package/es/canvas/contributions/wx/modules.js.map +0 -1
- package/es/env/all.d.ts +0 -4
- package/es/env/all.js +0 -34
- package/es/env/all.js.map +0 -1
- package/es/env/browser.d.ts +0 -3
- package/es/env/browser.js +0 -19
- package/es/env/browser.js.map +0 -1
- package/es/env/contributions/browser-contribution.d.ts +0 -42
- package/es/env/contributions/browser-contribution.js +0 -193
- package/es/env/contributions/browser-contribution.js.map +0 -1
- package/es/env/contributions/browser-module.d.ts +0 -2
- package/es/env/contributions/browser-module.js +0 -8
- package/es/env/contributions/browser-module.js.map +0 -1
- package/es/env/contributions/feishu-contribution.d.ts +0 -41
- package/es/env/contributions/feishu-contribution.js +0 -111
- package/es/env/contributions/feishu-contribution.js.map +0 -1
- package/es/env/contributions/feishu-module.d.ts +0 -2
- package/es/env/contributions/feishu-module.js +0 -8
- package/es/env/contributions/feishu-module.js.map +0 -1
- package/es/env/contributions/lynx-contribution.d.ts +0 -41
- package/es/env/contributions/lynx-contribution.js +0 -129
- package/es/env/contributions/lynx-contribution.js.map +0 -1
- package/es/env/contributions/taro-contribution.d.ts +0 -57
- package/es/env/contributions/taro-contribution.js +0 -137
- package/es/env/contributions/taro-contribution.js.map +0 -1
- package/es/env/contributions/wx-contribution.d.ts +0 -40
- package/es/env/contributions/wx-contribution.js +0 -126
- package/es/env/contributions/wx-contribution.js.map +0 -1
- package/es/env/feishu.d.ts +0 -3
- package/es/env/feishu.js +0 -19
- package/es/env/feishu.js.map +0 -1
- package/es/env/index.d.ts +0 -7
- package/es/env/index.js +0 -14
- package/es/env/index.js.map +0 -1
- package/es/env/lynx.d.ts +0 -3
- package/es/env/lynx.js +0 -19
- package/es/env/lynx.js.map +0 -1
- package/es/env/node.d.ts +0 -3
- package/es/env/node.js +0 -19
- package/es/env/node.js.map +0 -1
- package/es/env/taro.d.ts +0 -3
- package/es/env/taro.js +0 -19
- package/es/env/taro.js.map +0 -1
- package/es/env/wx.d.ts +0 -3
- package/es/env/wx.js +0 -19
- package/es/env/wx.js.map +0 -1
- package/es/event/extension/drag.d.ts +0 -9
- package/es/event/extension/drag.js +0 -45
- package/es/event/extension/drag.js.map +0 -1
- package/es/event/extension/gesture.d.ts +0 -38
- package/es/event/extension/gesture.js +0 -177
- package/es/event/extension/gesture.js.map +0 -1
- package/es/event/extension/index.d.ts +0 -3
- package/es/event/extension/index.js +0 -6
- package/es/event/extension/index.js.map +0 -1
- package/es/jsx/graphicType.d.ts +0 -171
- package/es/jsx/graphicType.js +0 -126
- package/es/jsx/graphicType.js.map +0 -1
- package/es/jsx/index.d.ts +0 -2
- package/es/jsx/index.js +0 -4
- package/es/jsx/index.js.map +0 -1
- package/es/jsx/jsx-classic.d.ts +0 -3
- package/es/jsx/jsx-classic.js +0 -56
- package/es/jsx/jsx-classic.js.map +0 -1
- package/es/picker/canvas-module.d.ts +0 -4
- package/es/picker/canvas-module.js +0 -15
- package/es/picker/canvas-module.js.map +0 -1
- package/es/picker/canvas-picker-service.d.ts +0 -28
- package/es/picker/canvas-picker-service.js +0 -79
- package/es/picker/canvas-picker-service.js.map +0 -1
- package/es/picker/contributions/canvas-picker/arc-picker.d.ts +0 -9
- package/es/picker/contributions/canvas-picker/arc-picker.js +0 -45
- package/es/picker/contributions/canvas-picker/arc-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/arc3d-picker.d.ts +0 -10
- package/es/picker/contributions/canvas-picker/arc3d-picker.js +0 -46
- package/es/picker/contributions/canvas-picker/arc3d-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/area-picker.d.ts +0 -9
- package/es/picker/contributions/canvas-picker/area-picker.js +0 -39
- package/es/picker/contributions/canvas-picker/area-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/base-picker.d.ts +0 -4
- package/es/picker/contributions/canvas-picker/base-picker.js +0 -14
- package/es/picker/contributions/canvas-picker/base-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/circle-picker.d.ts +0 -9
- package/es/picker/contributions/canvas-picker/circle-picker.js +0 -44
- package/es/picker/contributions/canvas-picker/circle-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/glyph-picker.d.ts +0 -9
- package/es/picker/contributions/canvas-picker/glyph-picker.js +0 -40
- package/es/picker/contributions/canvas-picker/glyph-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/group-picker.d.ts +0 -7
- package/es/picker/contributions/canvas-picker/group-picker.js +0 -21
- package/es/picker/contributions/canvas-picker/group-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/image-picker.d.ts +0 -7
- package/es/picker/contributions/canvas-picker/image-picker.js +0 -22
- package/es/picker/contributions/canvas-picker/image-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/line-picker.d.ts +0 -10
- package/es/picker/contributions/canvas-picker/line-picker.js +0 -52
- package/es/picker/contributions/canvas-picker/line-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/module.d.ts +0 -3
- package/es/picker/contributions/canvas-picker/module.js +0 -64
- package/es/picker/contributions/canvas-picker/module.js.map +0 -1
- package/es/picker/contributions/canvas-picker/path-picker.d.ts +0 -10
- package/es/picker/contributions/canvas-picker/path-picker.js +0 -53
- package/es/picker/contributions/canvas-picker/path-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/polygon-picker.d.ts +0 -9
- package/es/picker/contributions/canvas-picker/polygon-picker.js +0 -43
- package/es/picker/contributions/canvas-picker/polygon-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/pyramid3d-picker.d.ts +0 -10
- package/es/picker/contributions/canvas-picker/pyramid3d-picker.js +0 -47
- package/es/picker/contributions/canvas-picker/pyramid3d-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/rect-picker.d.ts +0 -9
- package/es/picker/contributions/canvas-picker/rect-picker.js +0 -59
- package/es/picker/contributions/canvas-picker/rect-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/rect3d-picker.d.ts +0 -10
- package/es/picker/contributions/canvas-picker/rect3d-picker.js +0 -50
- package/es/picker/contributions/canvas-picker/rect3d-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/richtext-picker.d.ts +0 -9
- package/es/picker/contributions/canvas-picker/richtext-picker.js +0 -27
- package/es/picker/contributions/canvas-picker/richtext-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/symbol-picker.d.ts +0 -10
- package/es/picker/contributions/canvas-picker/symbol-picker.js +0 -55
- package/es/picker/contributions/canvas-picker/symbol-picker.js.map +0 -1
- package/es/picker/contributions/canvas-picker/text-picker.d.ts +0 -10
- package/es/picker/contributions/canvas-picker/text-picker.js +0 -52
- package/es/picker/contributions/canvas-picker/text-picker.js.map +0 -1
- package/es/picker/contributions/constants.d.ts +0 -29
- package/es/picker/contributions/constants.js +0 -58
- package/es/picker/contributions/constants.js.map +0 -1
- package/es/picker/contributions/math-picker/arc-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/arc-picker.js +0 -45
- package/es/picker/contributions/math-picker/arc-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/area-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/area-picker.js +0 -39
- package/es/picker/contributions/math-picker/area-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/circle-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/circle-picker.js +0 -44
- package/es/picker/contributions/math-picker/circle-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/glyph-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/glyph-picker.js +0 -38
- package/es/picker/contributions/math-picker/glyph-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/line-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/line-picker.js +0 -44
- package/es/picker/contributions/math-picker/line-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/module.d.ts +0 -3
- package/es/picker/contributions/math-picker/module.js +0 -43
- package/es/picker/contributions/math-picker/module.js.map +0 -1
- package/es/picker/contributions/math-picker/path-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/path-picker.js +0 -44
- package/es/picker/contributions/math-picker/path-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/polygon-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/polygon-picker.js +0 -43
- package/es/picker/contributions/math-picker/polygon-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/rect-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/rect-picker.js +0 -59
- package/es/picker/contributions/math-picker/rect-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/symbol-picker.d.ts +0 -9
- package/es/picker/contributions/math-picker/symbol-picker.js +0 -44
- package/es/picker/contributions/math-picker/symbol-picker.js.map +0 -1
- package/es/picker/contributions/math-picker/text-picker.d.ts +0 -7
- package/es/picker/contributions/math-picker/text-picker.js +0 -21
- package/es/picker/contributions/math-picker/text-picker.js.map +0 -1
- package/es/picker/index.d.ts +0 -1
- package/es/picker/index.js +0 -2
- package/es/picker/index.js.map +0 -1
- package/es/picker/math-module.d.ts +0 -4
- package/es/picker/math-module.js +0 -15
- package/es/picker/math-module.js.map +0 -1
- package/es/picker/math-picker-service.d.ts +0 -16
- package/es/picker/math-picker-service.js +0 -48
- package/es/picker/math-picker-service.js.map +0 -1
- package/es/picker/module.d.ts +0 -6
- package/es/picker/module.js +0 -28
- package/es/picker/module.js.map +0 -1
- package/es/window/contributions/browser-contribution.d.ts +0 -49
- package/es/window/contributions/browser-contribution.js +0 -176
- package/es/window/contributions/browser-contribution.js.map +0 -1
- package/es/window/contributions/feishu-contribution.d.ts +0 -47
- package/es/window/contributions/feishu-contribution.js +0 -157
- package/es/window/contributions/feishu-contribution.js.map +0 -1
- package/es/window/contributions/lynx-contribution.d.ts +0 -47
- package/es/window/contributions/lynx-contribution.js +0 -157
- package/es/window/contributions/lynx-contribution.js.map +0 -1
- package/es/window/contributions/native-contribution.js +0 -1
- package/es/window/contributions/native-contribution.js.map +0 -1
- package/es/window/contributions/taro-contribution.d.ts +0 -47
- package/es/window/contributions/taro-contribution.js +0 -164
- package/es/window/contributions/taro-contribution.js.map +0 -1
- package/es/window/contributions/wx-contribution.d.ts +0 -47
- package/es/window/contributions/wx-contribution.js +0 -159
- package/es/window/contributions/wx-contribution.js.map +0 -1
- /package/cjs/{window/contributions/native-contribution.d.ts → canvas/contributions/canvas-module.d.ts} +0 -0
- /package/{es/window/contributions/native-contribution.d.ts → cjs/window/contributions/modules.d.ts} +0 -0
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import type { IPointLike, TextMeasure, ITextMeasureSpec } from '@visactor/vutils';
|
|
2
|
-
import { Matrix } from '@visactor/vutils';
|
|
3
|
-
import type { ICamera, ICanvas, ICommonStyleParams, IConicalGradientData, IContext2d, ISetCommonStyleParams, ISetStrokeStyleParams, IStrokeStyleParams, ITextStyleParams, mat4, EnvType, vec3 } from '@visactor/vrender-core';
|
|
4
|
-
export declare class BrowserContext2d implements IContext2d {
|
|
5
|
-
static env: EnvType;
|
|
6
|
-
drawPromise?: Promise<any>;
|
|
7
|
-
mathTextMeasure: TextMeasure<ITextMeasureSpec>;
|
|
8
|
-
canvas: ICanvas;
|
|
9
|
-
camera?: ICamera;
|
|
10
|
-
modelMatrix?: mat4;
|
|
11
|
-
nativeContext: CanvasRenderingContext2D | any;
|
|
12
|
-
_inuse: boolean;
|
|
13
|
-
stack: Matrix[];
|
|
14
|
-
disableFill?: boolean;
|
|
15
|
-
disableStroke?: boolean;
|
|
16
|
-
disableBeginPath?: boolean;
|
|
17
|
-
protected matrix: Matrix;
|
|
18
|
-
protected applyedMatrix?: Matrix;
|
|
19
|
-
fontFamily: string;
|
|
20
|
-
fontSize: number;
|
|
21
|
-
set fillStyle(d: string | CanvasGradient | CanvasPattern);
|
|
22
|
-
get fillStyle(): string | CanvasGradient | CanvasPattern;
|
|
23
|
-
set font(d: string);
|
|
24
|
-
get font(): string;
|
|
25
|
-
set globalAlpha(d: number);
|
|
26
|
-
get globalAlpha(): number;
|
|
27
|
-
set lineCap(d: CanvasLineCap);
|
|
28
|
-
get lineCap(): CanvasLineCap;
|
|
29
|
-
set lineDashOffset(d: number);
|
|
30
|
-
get lineDashOffset(): number;
|
|
31
|
-
set lineJoin(d: CanvasLineJoin);
|
|
32
|
-
get lineJoin(): CanvasLineJoin;
|
|
33
|
-
set lineWidth(d: number);
|
|
34
|
-
get lineWidth(): number;
|
|
35
|
-
set miterLimit(d: number);
|
|
36
|
-
get miterLimit(): number;
|
|
37
|
-
set shadowBlur(d: number);
|
|
38
|
-
get shadowBlur(): number;
|
|
39
|
-
set shadowColor(d: string);
|
|
40
|
-
get shadowColor(): string;
|
|
41
|
-
set shadowOffsetX(d: number);
|
|
42
|
-
get shadowOffsetX(): number;
|
|
43
|
-
set shadowOffsetY(d: number);
|
|
44
|
-
get shadowOffsetY(): number;
|
|
45
|
-
set strokeStyle(d: string | CanvasGradient | CanvasPattern);
|
|
46
|
-
get strokeStyle(): string | CanvasGradient | CanvasPattern;
|
|
47
|
-
set textAlign(d: CanvasTextAlign);
|
|
48
|
-
get textAlign(): CanvasTextAlign;
|
|
49
|
-
set textBaseline(d: CanvasTextBaseline);
|
|
50
|
-
get textBaseline(): CanvasTextBaseline;
|
|
51
|
-
get inuse(): boolean;
|
|
52
|
-
set inuse(use: boolean);
|
|
53
|
-
dpr: number;
|
|
54
|
-
constructor(canvas: ICanvas, dpr: number);
|
|
55
|
-
reset(): void;
|
|
56
|
-
getCanvas(): ICanvas;
|
|
57
|
-
getContext(): any;
|
|
58
|
-
setTransformForCurrent(force?: boolean): void;
|
|
59
|
-
get currentMatrix(): Matrix;
|
|
60
|
-
cloneMatrix(m: Matrix): import("@visactor/vutils").IMatrix;
|
|
61
|
-
clear(): void;
|
|
62
|
-
restore(): void;
|
|
63
|
-
highPerformanceRestore(): void;
|
|
64
|
-
rotate(rad: number, setTransform?: boolean): void;
|
|
65
|
-
save(): void;
|
|
66
|
-
highPerformanceSave(): void;
|
|
67
|
-
scale(sx: number, sy: number, setTransform?: boolean): void;
|
|
68
|
-
setScale(sx: number, sy: number, setTransform?: boolean): void;
|
|
69
|
-
scalePoint(sx: number, sy: number, px: number, py: number, setTransform?: boolean): void;
|
|
70
|
-
setTransform(a: number, b: number, c: number, d: number, e: number, f: number, setTransform?: boolean, dpr?: number): void;
|
|
71
|
-
setTransformFromMatrix(matrix: Matrix, setTransform?: boolean, dpr?: number): void;
|
|
72
|
-
resetTransform(setTransform?: boolean, dpr?: number): void;
|
|
73
|
-
transform(a: number, b: number, c: number, d: number, e: number, f: number, setTransform?: boolean): void;
|
|
74
|
-
transformFromMatrix(matrix: Matrix, setTransform?: boolean): void;
|
|
75
|
-
translate(x: number, y: number, setTransform?: boolean): void;
|
|
76
|
-
rotateDegrees(deg: number, setTransform?: boolean): void;
|
|
77
|
-
rotateAbout(rad: number, x: number, y: number, setTransform?: boolean): void;
|
|
78
|
-
rotateDegreesAbout(deg: number, x: number, y: number, setTransform?: boolean): void;
|
|
79
|
-
beginPath(): void;
|
|
80
|
-
clip(fillRule?: CanvasFillRule): void;
|
|
81
|
-
clip(path: Path2D, fillRule?: CanvasFillRule): void;
|
|
82
|
-
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean, z?: number): void;
|
|
83
|
-
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
|
|
84
|
-
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number, z?: number): void;
|
|
85
|
-
closePath(): void;
|
|
86
|
-
ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
|
|
87
|
-
lineTo(x: number, y: number, z: number): void;
|
|
88
|
-
moveTo(x: number, y: number, z: number): void;
|
|
89
|
-
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number, z: number): void;
|
|
90
|
-
rect(x: number, y: number, w: number, h: number, z: number): void;
|
|
91
|
-
createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
|
|
92
|
-
createLinearGradient(x0: number, y0: number, x1: number, y1: number): any;
|
|
93
|
-
createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
|
|
94
|
-
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
|
|
95
|
-
createConicGradient(x: number, y: number, startAngle: number, endAngle: number): IConicalGradientData;
|
|
96
|
-
fill(path?: Path2D, fillRule?: CanvasFillRule): void;
|
|
97
|
-
fillRect(x: number, y: number, width: number, height: number): void;
|
|
98
|
-
clearRect(x: number, y: number, w: number, h: number): void;
|
|
99
|
-
project(x: number, y: number, z: number): IPointLike;
|
|
100
|
-
view(x: number, y: number, z: number): vec3;
|
|
101
|
-
fillText(text: string, x: number, y: number, z: number): void;
|
|
102
|
-
getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
|
|
103
|
-
getLineDash(): number[];
|
|
104
|
-
isPointInPath(x: number, y: number): any;
|
|
105
|
-
isPointInStroke(x: number, y: number): any;
|
|
106
|
-
measureText(text: string, method?: 'native' | 'simple' | 'quick'): {
|
|
107
|
-
width: number;
|
|
108
|
-
};
|
|
109
|
-
putImageData(imagedata: ImageData, dx: number, dy: number): void;
|
|
110
|
-
setLineDash(segments: number[]): void;
|
|
111
|
-
stroke(path?: Path2D): void;
|
|
112
|
-
strokeRect(x: number, y: number, width: number, height: number): void;
|
|
113
|
-
strokeText(text: string, x: number, y: number, z: number): void;
|
|
114
|
-
drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number): void;
|
|
115
|
-
drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number, dstW: number, dstH: number): void;
|
|
116
|
-
drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, srcX: number, srcY: number, srcW: number, srcH: number, dstX: number, dstY: number, dstW: number, dstH: number): void;
|
|
117
|
-
protected fillAttributes: {
|
|
118
|
-
opacity: number;
|
|
119
|
-
fillOpacity: number;
|
|
120
|
-
shadowBlur: number;
|
|
121
|
-
shadowColor: string;
|
|
122
|
-
shadowOffsetX: number;
|
|
123
|
-
shadowOffsetY: number;
|
|
124
|
-
fill: import("@visactor/vrender-core").IFillType;
|
|
125
|
-
};
|
|
126
|
-
protected strokeAttributes: {
|
|
127
|
-
opacity: number;
|
|
128
|
-
outerBorder: Partial<import("@visactor/vrender-core").IBorderStyle>;
|
|
129
|
-
innerBorder: Partial<import("@visactor/vrender-core").IBorderStyle>;
|
|
130
|
-
strokeOpacity: number;
|
|
131
|
-
lineDash: number[];
|
|
132
|
-
lineDashOffset: number;
|
|
133
|
-
lineWidth: number;
|
|
134
|
-
lineCap: CanvasLineCap;
|
|
135
|
-
lineJoin: CanvasLineJoin;
|
|
136
|
-
miterLimit: number;
|
|
137
|
-
strokeBoundsBuffer: number;
|
|
138
|
-
stroke: import("@visactor/vrender-core").IStrokeType | import("@visactor/vrender-core").IStrokeType[];
|
|
139
|
-
};
|
|
140
|
-
protected textAttributes: {
|
|
141
|
-
opacity: number;
|
|
142
|
-
text: string | number | number[] | string[];
|
|
143
|
-
maxLineWidth: number;
|
|
144
|
-
textAlign: import("@visactor/vrender-core").TextAlignType;
|
|
145
|
-
textBaseline: import("@visactor/vrender-core").TextBaselineType;
|
|
146
|
-
fontSize: number;
|
|
147
|
-
fontFamily: string;
|
|
148
|
-
fontWeight: string | number;
|
|
149
|
-
ellipsis: string | boolean;
|
|
150
|
-
fontVariant: string;
|
|
151
|
-
fontStyle: string;
|
|
152
|
-
lineHeight: number;
|
|
153
|
-
underline: number;
|
|
154
|
-
lineThrough: number;
|
|
155
|
-
scaleIn3d: boolean;
|
|
156
|
-
direction: "horizontal" | "vertical";
|
|
157
|
-
verticalMode: number;
|
|
158
|
-
wordBreak: "break-word" | "break-all";
|
|
159
|
-
ignoreBuf: boolean;
|
|
160
|
-
};
|
|
161
|
-
setCommonStyle(params: ISetCommonStyleParams, attribute: ICommonStyleParams, offsetX: number, offsetY: number, defaultParams?: ICommonStyleParams | Partial<ICommonStyleParams>[]): void;
|
|
162
|
-
protected _setCommonStyle(params: ISetCommonStyleParams, attribute: ICommonStyleParams, offsetX: number, offsetY: number, defaultParams?: ICommonStyleParams): void;
|
|
163
|
-
setShadowStyle(params: ISetCommonStyleParams, attribute: ICommonStyleParams, defaultParams?: ICommonStyleParams | Partial<ICommonStyleParams>[]): void;
|
|
164
|
-
protected _clearShadowStyle: boolean;
|
|
165
|
-
protected _clearFilterStyle: boolean;
|
|
166
|
-
protected _setShadowStyle(params: ISetCommonStyleParams, attribute: ICommonStyleParams, defaultParams?: ICommonStyleParams): void;
|
|
167
|
-
setStrokeStyle(params: ISetStrokeStyleParams, attribute: IStrokeStyleParams, offsetX: number, offsetY: number, defaultParams?: IStrokeStyleParams | IStrokeStyleParams[]): void;
|
|
168
|
-
protected _setStrokeStyle(params: ISetStrokeStyleParams, attribute: IStrokeStyleParams, offsetX: number, offsetY: number, defaultParams?: IStrokeStyleParams): void;
|
|
169
|
-
setTextStyleWithoutAlignBaseline(params: Partial<ITextStyleParams>, defaultParams?: ITextStyleParams, z?: number): void;
|
|
170
|
-
setTextStyle(params: Partial<ITextStyleParams>, defaultParams?: ITextStyleParams, z?: number): void;
|
|
171
|
-
draw(): void;
|
|
172
|
-
clearMatrix(setTransform?: boolean, dpr?: number): void;
|
|
173
|
-
onlyTranslate(dpr?: number): boolean;
|
|
174
|
-
release(...params: any): void;
|
|
175
|
-
}
|
|
@@ -1,493 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
4
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
5
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
}, __metadata = this && this.__metadata || function(k, v) {
|
|
8
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "__esModule", {
|
|
12
|
-
value: !0
|
|
13
|
-
}), exports.BrowserContext2d = void 0;
|
|
14
|
-
|
|
15
|
-
const vutils_1 = require("@visactor/vutils"), vrender_core_1 = require("@visactor/vrender-core"), outP = [ 0, 0, 0 ], initMatrix = new vutils_1.Matrix(1, 0, 0, 1, 0, 0), addArcToBezierPath = (bezierPath, startAngle, endAngle, cx, cy, rx, ry, clockwise) => {
|
|
16
|
-
if (clockwise) for (;endAngle > startAngle; ) endAngle -= vutils_1.pi2; else for (;endAngle < startAngle; ) endAngle += vutils_1.pi2;
|
|
17
|
-
const step = vutils_1.pi / 3 * (endAngle > startAngle ? 1 : -1);
|
|
18
|
-
let sa = startAngle, ea = sa;
|
|
19
|
-
for (;ea !== endAngle; ) {
|
|
20
|
-
ea = step > 0 ? Math.min(ea + step, endAngle) : Math.max(ea + step, endAngle);
|
|
21
|
-
const delta = Math.abs(ea - sa), len = 4 * Math.tan(delta / 4) / 3, dir = ea < sa ? -1 : 1, c1 = Math.cos(sa), s1 = Math.sin(sa), c2 = Math.cos(ea), s2 = Math.sin(ea), x1 = c1 * rx + cx, y1 = s1 * ry + cy, x4 = c2 * rx + cx, y4 = s2 * ry + cy, hx = rx * len * dir, hy = ry * len * dir;
|
|
22
|
-
bezierPath.push([ x1 - hx * s1, y1 + hy * c1, x4 + hx * s2, y4 - hy * c2, x4, y4 ]),
|
|
23
|
-
sa = ea;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
let BrowserContext2d = class {
|
|
28
|
-
set fillStyle(d) {
|
|
29
|
-
this.nativeContext.fillStyle = d;
|
|
30
|
-
}
|
|
31
|
-
get fillStyle() {
|
|
32
|
-
return this.nativeContext.fillStyle;
|
|
33
|
-
}
|
|
34
|
-
set font(d) {
|
|
35
|
-
this.nativeContext.font = d;
|
|
36
|
-
}
|
|
37
|
-
get font() {
|
|
38
|
-
return this.nativeContext.font;
|
|
39
|
-
}
|
|
40
|
-
set globalAlpha(d) {
|
|
41
|
-
this.nativeContext.globalAlpha = d;
|
|
42
|
-
}
|
|
43
|
-
get globalAlpha() {
|
|
44
|
-
return this.nativeContext.globalAlpha;
|
|
45
|
-
}
|
|
46
|
-
set lineCap(d) {
|
|
47
|
-
this.nativeContext.lineCap = d;
|
|
48
|
-
}
|
|
49
|
-
get lineCap() {
|
|
50
|
-
return this.nativeContext.lineCap;
|
|
51
|
-
}
|
|
52
|
-
set lineDashOffset(d) {
|
|
53
|
-
this.nativeContext.lineDashOffset = d;
|
|
54
|
-
}
|
|
55
|
-
get lineDashOffset() {
|
|
56
|
-
return this.nativeContext.lineDashOffset;
|
|
57
|
-
}
|
|
58
|
-
set lineJoin(d) {
|
|
59
|
-
this.nativeContext.lineJoin = d;
|
|
60
|
-
}
|
|
61
|
-
get lineJoin() {
|
|
62
|
-
return this.nativeContext.lineJoin;
|
|
63
|
-
}
|
|
64
|
-
set lineWidth(d) {
|
|
65
|
-
this.nativeContext.lineWidth = d;
|
|
66
|
-
}
|
|
67
|
-
get lineWidth() {
|
|
68
|
-
return this.nativeContext.lineWidth;
|
|
69
|
-
}
|
|
70
|
-
set miterLimit(d) {
|
|
71
|
-
this.nativeContext.miterLimit = d;
|
|
72
|
-
}
|
|
73
|
-
get miterLimit() {
|
|
74
|
-
return this.nativeContext.miterLimit;
|
|
75
|
-
}
|
|
76
|
-
set shadowBlur(d) {
|
|
77
|
-
this.nativeContext.shadowBlur = d;
|
|
78
|
-
}
|
|
79
|
-
get shadowBlur() {
|
|
80
|
-
return this.nativeContext.shadowBlur;
|
|
81
|
-
}
|
|
82
|
-
set shadowColor(d) {
|
|
83
|
-
this.nativeContext.shadowColor = d;
|
|
84
|
-
}
|
|
85
|
-
get shadowColor() {
|
|
86
|
-
return this.nativeContext.shadowColor;
|
|
87
|
-
}
|
|
88
|
-
set shadowOffsetX(d) {
|
|
89
|
-
this.nativeContext.shadowOffsetX = d;
|
|
90
|
-
}
|
|
91
|
-
get shadowOffsetX() {
|
|
92
|
-
return this.nativeContext.shadowOffsetX;
|
|
93
|
-
}
|
|
94
|
-
set shadowOffsetY(d) {
|
|
95
|
-
this.nativeContext.shadowOffsetY = d;
|
|
96
|
-
}
|
|
97
|
-
get shadowOffsetY() {
|
|
98
|
-
return this.nativeContext.shadowOffsetY;
|
|
99
|
-
}
|
|
100
|
-
set strokeStyle(d) {
|
|
101
|
-
this.nativeContext.strokeStyle = d;
|
|
102
|
-
}
|
|
103
|
-
get strokeStyle() {
|
|
104
|
-
return this.nativeContext.strokeStyle;
|
|
105
|
-
}
|
|
106
|
-
set textAlign(d) {
|
|
107
|
-
this.nativeContext.textAlign = d;
|
|
108
|
-
}
|
|
109
|
-
get textAlign() {
|
|
110
|
-
return this.nativeContext.textAlign;
|
|
111
|
-
}
|
|
112
|
-
set textBaseline(d) {
|
|
113
|
-
this.nativeContext.textBaseline = d;
|
|
114
|
-
}
|
|
115
|
-
get textBaseline() {
|
|
116
|
-
return this.nativeContext.textBaseline;
|
|
117
|
-
}
|
|
118
|
-
get inuse() {
|
|
119
|
-
return !!this._inuse;
|
|
120
|
-
}
|
|
121
|
-
set inuse(use) {
|
|
122
|
-
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : this.nativeContext.restore());
|
|
123
|
-
}
|
|
124
|
-
constructor(canvas, dpr) {
|
|
125
|
-
this.fillAttributes = Object.assign(Object.assign({}, vrender_core_1.DefaultFillStyle), {
|
|
126
|
-
opacity: 1
|
|
127
|
-
}), this.strokeAttributes = Object.assign(Object.assign({}, vrender_core_1.DefaultStrokeStyle), {
|
|
128
|
-
opacity: 1
|
|
129
|
-
}), this.textAttributes = Object.assign(Object.assign({}, vrender_core_1.DefaultTextStyle), {
|
|
130
|
-
opacity: 1
|
|
131
|
-
}), this._clearShadowStyle = !1, this._clearFilterStyle = !1;
|
|
132
|
-
const context = canvas.nativeCanvas.getContext("2d");
|
|
133
|
-
if (!context) throw new Error("发生错误,获取2d上下文失败");
|
|
134
|
-
this.nativeContext = context, this.canvas = canvas, this.matrix = new vutils_1.Matrix(1, 0, 0, 1, 0, 0),
|
|
135
|
-
this.stack = [], this.dpr = dpr, this.applyedMatrix = new vutils_1.Matrix(1, 0, 0, 1, 0, 0);
|
|
136
|
-
}
|
|
137
|
-
reset() {
|
|
138
|
-
this.stack.length && console.warn("可能存在bug,matrix没有清空"), this.matrix.setValue(1, 0, 0, 1, 0, 0),
|
|
139
|
-
this.applyedMatrix = new vutils_1.Matrix(1, 0, 0, 1, 0, 0), this.stack.length = 0,
|
|
140
|
-
this.nativeContext.setTransform(1, 0, 0, 1, 0, 0);
|
|
141
|
-
}
|
|
142
|
-
getCanvas() {
|
|
143
|
-
return this.canvas;
|
|
144
|
-
}
|
|
145
|
-
getContext() {
|
|
146
|
-
return this.nativeContext;
|
|
147
|
-
}
|
|
148
|
-
setTransformForCurrent(force = !1) {
|
|
149
|
-
!force && this.applyedMatrix.equalToMatrix(this.matrix) || (this.applyedMatrix.setValue(this.matrix.a, this.matrix.b, this.matrix.c, this.matrix.d, this.matrix.e, this.matrix.f),
|
|
150
|
-
this.nativeContext.setTransform(this.matrix.a, this.matrix.b, this.matrix.c, this.matrix.d, this.matrix.e, this.matrix.f));
|
|
151
|
-
}
|
|
152
|
-
get currentMatrix() {
|
|
153
|
-
return this.matrix;
|
|
154
|
-
}
|
|
155
|
-
cloneMatrix(m) {
|
|
156
|
-
return vrender_core_1.matrixAllocate.allocateByObj(m);
|
|
157
|
-
}
|
|
158
|
-
clear() {
|
|
159
|
-
this.save(), this.resetTransform(), this.nativeContext.clearRect(0, 0, this.canvas.width, this.canvas.height),
|
|
160
|
-
this.restore();
|
|
161
|
-
}
|
|
162
|
-
restore() {
|
|
163
|
-
this.nativeContext.restore(), this.stack.length > 0 && (vrender_core_1.matrixAllocate.free(this.matrix),
|
|
164
|
-
this.matrix = this.stack.pop(), this.setTransformForCurrent(!0));
|
|
165
|
-
}
|
|
166
|
-
highPerformanceRestore() {
|
|
167
|
-
this.stack.length > 0 && (vrender_core_1.matrixAllocate.free(this.matrix), this.matrix = this.stack.pop());
|
|
168
|
-
}
|
|
169
|
-
rotate(rad, setTransform = !0) {
|
|
170
|
-
this.matrix.rotate(rad), setTransform && this.setTransformForCurrent();
|
|
171
|
-
}
|
|
172
|
-
save() {
|
|
173
|
-
const matrix = this.cloneMatrix(this.matrix);
|
|
174
|
-
this.stack.push(matrix), this.nativeContext.save();
|
|
175
|
-
}
|
|
176
|
-
highPerformanceSave() {
|
|
177
|
-
const matrix = this.cloneMatrix(this.matrix);
|
|
178
|
-
this.stack.push(matrix);
|
|
179
|
-
}
|
|
180
|
-
scale(sx, sy, setTransform = !0) {
|
|
181
|
-
this.matrix.scale(sx, sy), setTransform && this.setTransformForCurrent();
|
|
182
|
-
}
|
|
183
|
-
setScale(sx, sy, setTransform = !0) {
|
|
184
|
-
this.matrix.setScale(sx, sy), setTransform && this.setTransformForCurrent();
|
|
185
|
-
}
|
|
186
|
-
scalePoint(sx, sy, px, py, setTransform = !0) {
|
|
187
|
-
this.translate(px, py, !1), this.scale(sx, sy, !1), this.translate(-px, -py, !1),
|
|
188
|
-
setTransform && this.setTransformForCurrent();
|
|
189
|
-
}
|
|
190
|
-
setTransform(a, b, c, d, e, f, setTransform = !0, dpr = this.dpr) {
|
|
191
|
-
this.matrix.setValue(dpr * a, dpr * b, dpr * c, dpr * d, dpr * e, dpr * f), setTransform && this.setTransformForCurrent();
|
|
192
|
-
}
|
|
193
|
-
setTransformFromMatrix(matrix, setTransform = !0, dpr = this.dpr) {
|
|
194
|
-
this.matrix.setValue(matrix.a * dpr, matrix.b * dpr, matrix.c * dpr, matrix.d * dpr, matrix.e * dpr, matrix.f * dpr),
|
|
195
|
-
setTransform && this.setTransformForCurrent();
|
|
196
|
-
}
|
|
197
|
-
resetTransform(setTransform = !0, dpr = this.dpr) {
|
|
198
|
-
this.setTransform(dpr, 0, 0, dpr, 0, 0), setTransform && this.setTransformForCurrent();
|
|
199
|
-
}
|
|
200
|
-
transform(a, b, c, d, e, f, setTransform = !0) {
|
|
201
|
-
this.matrix.multiply(a, b, c, d, e, f), setTransform && this.setTransformForCurrent();
|
|
202
|
-
}
|
|
203
|
-
transformFromMatrix(matrix, setTransform) {
|
|
204
|
-
this.matrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f),
|
|
205
|
-
setTransform && this.setTransformForCurrent();
|
|
206
|
-
}
|
|
207
|
-
translate(x, y, setTransform = !0) {
|
|
208
|
-
this.matrix.translate(x, y), setTransform && this.setTransformForCurrent();
|
|
209
|
-
}
|
|
210
|
-
rotateDegrees(deg, setTransform = !0) {
|
|
211
|
-
const rad = deg * Math.PI / 180;
|
|
212
|
-
this.rotate(rad, setTransform);
|
|
213
|
-
}
|
|
214
|
-
rotateAbout(rad, x, y, setTransform = !0) {
|
|
215
|
-
this.translate(x, y, !1), this.rotate(rad, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
|
|
216
|
-
}
|
|
217
|
-
rotateDegreesAbout(deg, x, y, setTransform = !0) {
|
|
218
|
-
this.translate(x, y, !1), this.rotateDegrees(deg, !1), this.translate(-x, -y, !1),
|
|
219
|
-
setTransform && this.setTransformForCurrent();
|
|
220
|
-
}
|
|
221
|
-
beginPath() {
|
|
222
|
-
this.disableBeginPath || this.nativeContext.beginPath();
|
|
223
|
-
}
|
|
224
|
-
clip(path, fillRule) {
|
|
225
|
-
path ? "string" == typeof path ? this.nativeContext.clip(path) : this.nativeContext.clip(path, fillRule) : this.nativeContext.clip();
|
|
226
|
-
}
|
|
227
|
-
arc(x, y, radius, startAngle, endAngle, anticlockwise, z) {
|
|
228
|
-
if (z = z || 0, this.camera) {
|
|
229
|
-
const arr = [];
|
|
230
|
-
addArcToBezierPath(arr, startAngle, endAngle, x, y, radius, radius, anticlockwise);
|
|
231
|
-
for (let i = 0; i < arr.length; ++i) {
|
|
232
|
-
const bez = arr[i];
|
|
233
|
-
this.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5], z);
|
|
234
|
-
}
|
|
235
|
-
} else this.nativeContext.arc(x, y, radius, startAngle, endAngle, anticlockwise);
|
|
236
|
-
}
|
|
237
|
-
arcTo(x1, y1, x2, y2, radiusX) {
|
|
238
|
-
this.nativeContext.arcTo(x1, y1, x2, y2, radiusX);
|
|
239
|
-
}
|
|
240
|
-
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y, z) {
|
|
241
|
-
if (z = z || 0, this.camera) {
|
|
242
|
-
let cp1z = z, cp2z = z;
|
|
243
|
-
this.modelMatrix && ((0, vrender_core_1.transformMat4)(outP, [ cp1x, cp1y, z ], this.modelMatrix),
|
|
244
|
-
cp1x = outP[0], cp1y = outP[1], cp1z = outP[2], (0, vrender_core_1.transformMat4)(outP, [ cp2x, cp2y, z ], this.modelMatrix),
|
|
245
|
-
cp2x = outP[0], cp2y = outP[1], cp2z = outP[2], (0, vrender_core_1.transformMat4)(outP, [ x, y, z ], this.modelMatrix),
|
|
246
|
-
x = outP[0], y = outP[1], z = outP[2]);
|
|
247
|
-
let data = this.camera.vp(x, y, z);
|
|
248
|
-
x = data.x, y = data.y, data = this.camera.vp(cp1x, cp1y, cp1z), cp1x = data.x,
|
|
249
|
-
cp1y = data.y, data = this.camera.vp(cp2x, cp2y, cp2z), cp2x = data.x, cp2y = data.y;
|
|
250
|
-
}
|
|
251
|
-
this.nativeContext.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);
|
|
252
|
-
}
|
|
253
|
-
closePath() {
|
|
254
|
-
this.nativeContext.closePath();
|
|
255
|
-
}
|
|
256
|
-
ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
|
|
257
|
-
null == anticlockwise ? this.nativeContext.ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle) : this.nativeContext.ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
|
|
258
|
-
}
|
|
259
|
-
lineTo(x, y, z) {
|
|
260
|
-
if (z = z || 0, this.camera) {
|
|
261
|
-
this.modelMatrix && ((0, vrender_core_1.transformMat4)(outP, [ x, y, z ], this.modelMatrix),
|
|
262
|
-
x = outP[0], y = outP[1], z = outP[2]);
|
|
263
|
-
const data = this.camera.vp(x, y, z);
|
|
264
|
-
x = data.x, y = data.y;
|
|
265
|
-
}
|
|
266
|
-
this.nativeContext.lineTo(x, y);
|
|
267
|
-
}
|
|
268
|
-
moveTo(x, y, z) {
|
|
269
|
-
if (z = z || 0, this.camera) {
|
|
270
|
-
this.modelMatrix && ((0, vrender_core_1.transformMat4)(outP, [ x, y, z ], this.modelMatrix),
|
|
271
|
-
x = outP[0], y = outP[1], z = outP[2]);
|
|
272
|
-
const data = this.camera.vp(x, y, z);
|
|
273
|
-
x = data.x, y = data.y;
|
|
274
|
-
}
|
|
275
|
-
this.nativeContext.moveTo(x, y);
|
|
276
|
-
}
|
|
277
|
-
quadraticCurveTo(cpx, cpy, x, y, z) {
|
|
278
|
-
if (z = z || 0, this.camera) {
|
|
279
|
-
let cpz = z;
|
|
280
|
-
this.modelMatrix && ((0, vrender_core_1.transformMat4)(outP, [ cpx, cpy, z ], this.modelMatrix),
|
|
281
|
-
cpx = outP[0], cpy = outP[1], cpz = outP[2], (0, vrender_core_1.transformMat4)(outP, [ x, y, z ], this.modelMatrix),
|
|
282
|
-
x = outP[0], y = outP[1], z = outP[2]);
|
|
283
|
-
let data = this.camera.vp(x, y, z);
|
|
284
|
-
x = data.x, y = data.y, data = this.camera.vp(cpx, cpy, cpz), cpx = data.x, cpy = data.y;
|
|
285
|
-
}
|
|
286
|
-
this.nativeContext.quadraticCurveTo(cpx, cpy, x, y);
|
|
287
|
-
}
|
|
288
|
-
rect(x, y, w, h, z) {
|
|
289
|
-
z = z || 0, this.camera ? (this.moveTo(x, y, z), this.lineTo(x + w, y, z), this.lineTo(x + w, y + h, z),
|
|
290
|
-
this.lineTo(x, y + h, z), this.closePath()) : this.nativeContext.rect(x, y, w, h);
|
|
291
|
-
}
|
|
292
|
-
createImageData() {
|
|
293
|
-
const a = arguments;
|
|
294
|
-
return 2 === a.length ? this.nativeContext.createImageData(a[0], a[1]) : 1 === a.length ? this.nativeContext.createImageData(a[0]) : null;
|
|
295
|
-
}
|
|
296
|
-
createLinearGradient(x0, y0, x1, y1) {
|
|
297
|
-
return this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
298
|
-
}
|
|
299
|
-
createPattern(image, repetition) {
|
|
300
|
-
return 0 === image.width || 0 === image.height ? null : this.nativeContext.createPattern(image, repetition);
|
|
301
|
-
}
|
|
302
|
-
createRadialGradient(x0, y0, r0, x1, y1, r1) {
|
|
303
|
-
return this.nativeContext.createRadialGradient(x0, y0, r0, x1, y1, r1);
|
|
304
|
-
}
|
|
305
|
-
createConicGradient(x, y, startAngle, endAngle) {
|
|
306
|
-
let pattern, edit = !1;
|
|
307
|
-
const ctx = this;
|
|
308
|
-
return {
|
|
309
|
-
stops: [],
|
|
310
|
-
addColorStop(offset, color) {
|
|
311
|
-
this.stops.push([ offset, color ]), edit = !0;
|
|
312
|
-
},
|
|
313
|
-
GetPattern(minW, minH, deltaAngle) {
|
|
314
|
-
return edit && (deltaAngle || (deltaAngle = endAngle - startAngle), pattern = (0,
|
|
315
|
-
vrender_core_1.createConicalGradient)(ctx, this.stops, x, y, deltaAngle, startAngle, endAngle, minW, minH),
|
|
316
|
-
edit = !1), pattern;
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
fill(path, fillRule) {
|
|
321
|
-
this.disableFill || (path ? this.nativeContext.fill(path) : this.nativeContext.fill());
|
|
322
|
-
}
|
|
323
|
-
fillRect(x, y, width, height) {
|
|
324
|
-
this.nativeContext.fillRect(x, y, width, height);
|
|
325
|
-
}
|
|
326
|
-
clearRect(x, y, w, h) {
|
|
327
|
-
this.nativeContext.clearRect(x, y, w, h);
|
|
328
|
-
}
|
|
329
|
-
project(x, y, z) {
|
|
330
|
-
if (z = z || 0, this.camera) {
|
|
331
|
-
this.modelMatrix && ((0, vrender_core_1.transformMat4)(outP, [ x, y, z ], this.modelMatrix),
|
|
332
|
-
x = outP[0], y = outP[1], z = outP[2]);
|
|
333
|
-
const data = this.camera.vp(x, y, z);
|
|
334
|
-
x = data.x, y = data.y;
|
|
335
|
-
}
|
|
336
|
-
return {
|
|
337
|
-
x: x,
|
|
338
|
-
y: y
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
view(x, y, z) {
|
|
342
|
-
return z = z || 0, this.camera ? (this.modelMatrix && ((0, vrender_core_1.transformMat4)(outP, [ x, y, z ], this.modelMatrix),
|
|
343
|
-
x = outP[0], y = outP[1], z = outP[2]), this.camera.view(x, y, z)) : [ x, y, z ];
|
|
344
|
-
}
|
|
345
|
-
fillText(text, x, y, z) {
|
|
346
|
-
if (z = z || 0, this.camera) {
|
|
347
|
-
this.modelMatrix && ((0, vrender_core_1.transformMat4)(outP, [ x, y, z ], this.modelMatrix),
|
|
348
|
-
x = outP[0], y = outP[1], z = outP[2]);
|
|
349
|
-
const data = this.camera.vp(x, y, z);
|
|
350
|
-
x = data.x, y = data.y;
|
|
351
|
-
}
|
|
352
|
-
this.nativeContext.fillText(text, x, y);
|
|
353
|
-
}
|
|
354
|
-
getImageData(sx, sy, sw, sh) {
|
|
355
|
-
return this.nativeContext.getImageData(sx, sy, sw, sh);
|
|
356
|
-
}
|
|
357
|
-
getLineDash() {
|
|
358
|
-
return this.nativeContext.getLineDash();
|
|
359
|
-
}
|
|
360
|
-
isPointInPath(x, y) {
|
|
361
|
-
return this.nativeContext.isPointInPath(x, y);
|
|
362
|
-
}
|
|
363
|
-
isPointInStroke(x, y) {
|
|
364
|
-
return this.nativeContext.isPointInStroke(x, y);
|
|
365
|
-
}
|
|
366
|
-
measureText(text, method = vrender_core_1.application.global.measureTextMethod) {
|
|
367
|
-
var _a, _b;
|
|
368
|
-
return method && "native" !== method ? (this.mathTextMeasure || (this.mathTextMeasure = vrender_core_1.application.graphicUtil.createTextMeasureInstance({}, {}, (() => this.canvas))),
|
|
369
|
-
this.mathTextMeasure.textSpec.fontFamily = null !== (_a = this.fontFamily) && void 0 !== _a ? _a : vrender_core_1.DefaultTextStyle.fontFamily,
|
|
370
|
-
this.mathTextMeasure.textSpec.fontSize = null !== (_b = this.fontSize) && void 0 !== _b ? _b : vrender_core_1.DefaultTextStyle.fontSize,
|
|
371
|
-
this.mathTextMeasure._numberCharSize = null, this.mathTextMeasure._fullCharSize = null,
|
|
372
|
-
this.mathTextMeasure._letterCharSize = null, this.mathTextMeasure._specialCharSizeMap = {},
|
|
373
|
-
this.mathTextMeasure.measure(text, method)) : this.nativeContext.measureText(text);
|
|
374
|
-
}
|
|
375
|
-
putImageData(imagedata, dx, dy) {
|
|
376
|
-
this.nativeContext.putImageData(imagedata, dx, dy);
|
|
377
|
-
}
|
|
378
|
-
setLineDash(segments) {
|
|
379
|
-
const a = arguments, _context = this.nativeContext;
|
|
380
|
-
this.nativeContext.setLineDash ? _context.setLineDash(a[0]) : "mozDash" in _context ? _context.mozDash = a[0] : "webkitLineDash" in _context && (_context.webkitLineDash = a[0]);
|
|
381
|
-
}
|
|
382
|
-
stroke(path) {
|
|
383
|
-
this.disableStroke || (path ? this.nativeContext.stroke(path) : this.nativeContext.stroke());
|
|
384
|
-
}
|
|
385
|
-
strokeRect(x, y, width, height) {
|
|
386
|
-
this.nativeContext.strokeRect(x, y, width, height);
|
|
387
|
-
}
|
|
388
|
-
strokeText(text, x, y, z) {
|
|
389
|
-
if (z = z || 0, this.camera) {
|
|
390
|
-
this.modelMatrix && ((0, vrender_core_1.transformMat4)(outP, [ x, y, z ], this.modelMatrix),
|
|
391
|
-
x = outP[0], y = outP[1], z = outP[2]);
|
|
392
|
-
const data = this.camera.vp(x, y, z);
|
|
393
|
-
x = data.x, y = data.y;
|
|
394
|
-
}
|
|
395
|
-
this.nativeContext.strokeText(text, x, y);
|
|
396
|
-
}
|
|
397
|
-
drawImage() {
|
|
398
|
-
const _context = this.nativeContext, a = arguments;
|
|
399
|
-
3 === a.length ? _context.drawImage(a[0], a[1], a[2]) : 5 === a.length ? _context.drawImage(a[0], a[1], a[2], a[3], a[4]) : 9 === a.length && _context.drawImage(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
|
|
400
|
-
}
|
|
401
|
-
setCommonStyle(params, attribute, offsetX, offsetY, defaultParams) {
|
|
402
|
-
if (Array.isArray(defaultParams)) {
|
|
403
|
-
if (defaultParams.length <= 1) return this._setCommonStyle(params, attribute, offsetX, offsetY, defaultParams[0]);
|
|
404
|
-
const dp = {};
|
|
405
|
-
return defaultParams.forEach((p => {
|
|
406
|
-
Object.assign(dp, p);
|
|
407
|
-
})), this._setCommonStyle(params, attribute, offsetX, offsetY, dp);
|
|
408
|
-
}
|
|
409
|
-
return this._setCommonStyle(params, attribute, offsetX, offsetY, defaultParams);
|
|
410
|
-
}
|
|
411
|
-
_setCommonStyle(params, attribute, offsetX, offsetY, defaultParams) {
|
|
412
|
-
const _context = this.nativeContext;
|
|
413
|
-
defaultParams || (defaultParams = this.fillAttributes);
|
|
414
|
-
const {fillOpacity: fillOpacity = defaultParams.fillOpacity, opacity: opacity = defaultParams.opacity, fill: fill = defaultParams.fill} = attribute;
|
|
415
|
-
fillOpacity > 1e-12 && opacity > 1e-12 ? (_context.globalAlpha = fillOpacity * opacity,
|
|
416
|
-
_context.fillStyle = (0, vrender_core_1.createColor)(this, fill, params, offsetX, offsetY)) : _context.globalAlpha = fillOpacity * opacity;
|
|
417
|
-
}
|
|
418
|
-
setShadowStyle(params, attribute, defaultParams) {
|
|
419
|
-
if (Array.isArray(defaultParams)) {
|
|
420
|
-
if (defaultParams.length <= 1) return this._setShadowStyle(params, defaultParams[0]);
|
|
421
|
-
const dp = {};
|
|
422
|
-
return defaultParams.forEach((p => {
|
|
423
|
-
Object.assign(dp, p);
|
|
424
|
-
})), this._setShadowStyle(params, attribute, dp);
|
|
425
|
-
}
|
|
426
|
-
return this._setShadowStyle(params, attribute, defaultParams);
|
|
427
|
-
}
|
|
428
|
-
_setShadowStyle(params, attribute, defaultParams) {
|
|
429
|
-
const _context = this.nativeContext;
|
|
430
|
-
defaultParams || (defaultParams = this.fillAttributes);
|
|
431
|
-
const {opacity: opacity = defaultParams.opacity, shadowBlur: shadowBlur = defaultParams.shadowBlur, shadowColor: shadowColor = defaultParams.shadowColor, shadowOffsetX: shadowOffsetX = defaultParams.shadowOffsetX, shadowOffsetY: shadowOffsetY = defaultParams.shadowOffsetY, blur: blur = defaultParams.blur} = attribute;
|
|
432
|
-
opacity <= 1e-12 || (shadowBlur || shadowOffsetX || shadowOffsetY ? (_context.shadowBlur = shadowBlur,
|
|
433
|
-
_context.shadowColor = shadowColor, _context.shadowOffsetX = shadowOffsetX, _context.shadowOffsetY = shadowOffsetY,
|
|
434
|
-
this._clearShadowStyle = !0) : this._clearShadowStyle && (_context.shadowBlur = 0,
|
|
435
|
-
_context.shadowOffsetX = 0, _context.shadowOffsetY = 0), blur ? (_context.filter = `blur(${blur}px)`,
|
|
436
|
-
this._clearFilterStyle = !0) : this._clearFilterStyle && (_context.filter = "blur(0px)",
|
|
437
|
-
this._clearFilterStyle = !1));
|
|
438
|
-
}
|
|
439
|
-
setStrokeStyle(params, attribute, offsetX, offsetY, defaultParams) {
|
|
440
|
-
if (Array.isArray(defaultParams)) {
|
|
441
|
-
if (defaultParams.length <= 1) return this._setStrokeStyle(params, attribute, offsetX, offsetY, defaultParams[0]);
|
|
442
|
-
const dp = {};
|
|
443
|
-
return defaultParams.forEach((p => {
|
|
444
|
-
Object.assign(dp, p);
|
|
445
|
-
})), this._setStrokeStyle(params, attribute, offsetX, offsetY, dp);
|
|
446
|
-
}
|
|
447
|
-
return this._setStrokeStyle(params, attribute, offsetX, offsetY, defaultParams);
|
|
448
|
-
}
|
|
449
|
-
_setStrokeStyle(params, attribute, offsetX, offsetY, defaultParams) {
|
|
450
|
-
const _context = this.nativeContext;
|
|
451
|
-
defaultParams || (defaultParams = this.strokeAttributes);
|
|
452
|
-
const {strokeOpacity: strokeOpacity = defaultParams.strokeOpacity, opacity: opacity = defaultParams.opacity} = attribute;
|
|
453
|
-
if (strokeOpacity > 1e-12 && opacity > 1e-12) {
|
|
454
|
-
const {lineWidth: lineWidth = defaultParams.lineWidth, stroke: stroke = defaultParams.stroke, lineJoin: lineJoin = defaultParams.lineJoin, lineDash: lineDash = defaultParams.lineDash, lineCap: lineCap = defaultParams.lineCap, miterLimit: miterLimit = defaultParams.miterLimit} = attribute;
|
|
455
|
-
_context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = (0, vrender_core_1.getScaledStroke)(this, lineWidth, this.dpr),
|
|
456
|
-
_context.strokeStyle = (0, vrender_core_1.createColor)(this, stroke, params, offsetX, offsetY),
|
|
457
|
-
_context.lineJoin = lineJoin, _context.setLineDash(lineDash), _context.lineCap = lineCap,
|
|
458
|
-
_context.miterLimit = miterLimit;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
setTextStyleWithoutAlignBaseline(params, defaultParams, z) {
|
|
462
|
-
const _context = this.nativeContext;
|
|
463
|
-
defaultParams || (defaultParams = this.textAttributes);
|
|
464
|
-
const {scaleIn3d: scaleIn3d = defaultParams.scaleIn3d} = params;
|
|
465
|
-
params.font ? _context.font = params.font : _context.font = (0, vrender_core_1.getContextFont)(params, defaultParams, scaleIn3d && this.camera && this.camera.getProjectionScale(z));
|
|
466
|
-
const {fontFamily: fontFamily = defaultParams.fontFamily, fontSize: fontSize = defaultParams.fontSize} = params;
|
|
467
|
-
this.fontFamily = fontFamily, this.fontSize = fontSize, _context.textAlign = "left",
|
|
468
|
-
_context.textBaseline = "alphabetic";
|
|
469
|
-
}
|
|
470
|
-
setTextStyle(params, defaultParams, z) {
|
|
471
|
-
var _a, _b;
|
|
472
|
-
const _context = this.nativeContext;
|
|
473
|
-
defaultParams || (defaultParams = this.textAttributes), params.font ? _context.font = params.font : _context.font = (0,
|
|
474
|
-
vrender_core_1.getContextFont)(params, defaultParams, this.camera && this.camera.getProjectionScale(z));
|
|
475
|
-
const {fontFamily: fontFamily = defaultParams.fontFamily, fontSize: fontSize = defaultParams.fontSize} = params;
|
|
476
|
-
this.fontFamily = fontFamily, this.fontSize = fontSize, _context.textAlign = null !== (_a = params.textAlign) && void 0 !== _a ? _a : defaultParams.textAlign,
|
|
477
|
-
_context.textBaseline = null !== (_b = params.textBaseline) && void 0 !== _b ? _b : defaultParams.textBaseline;
|
|
478
|
-
}
|
|
479
|
-
draw() {}
|
|
480
|
-
clearMatrix(setTransform = !0, dpr = this.dpr) {
|
|
481
|
-
this.setTransformFromMatrix(initMatrix, setTransform, dpr);
|
|
482
|
-
}
|
|
483
|
-
onlyTranslate(dpr = this.dpr) {
|
|
484
|
-
return this.matrix.a === dpr && 0 === this.matrix.b && 0 === this.matrix.c && this.matrix.d === dpr;
|
|
485
|
-
}
|
|
486
|
-
release(...params) {
|
|
487
|
-
this.stack.forEach((m => vrender_core_1.matrixAllocate.free(m))), this.stack.length = 0;
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
|
|
491
|
-
BrowserContext2d.env = "browser", BrowserContext2d = __decorate([ (0, vrender_core_1.injectable)(), __metadata("design:paramtypes", [ Object, Number ]) ], BrowserContext2d),
|
|
492
|
-
exports.BrowserContext2d = BrowserContext2d;
|
|
493
|
-
//# sourceMappingURL=context.js.map
|