@visactor/vrender-core 1.0.37-alpha.1 → 1.1.0-alpha.0
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/allocator/canvas-allocate.js +7 -5
- package/cjs/allocator/canvas-allocate.js.map +1 -1
- package/cjs/allocator/graphic-allocate.js +17 -17
- package/cjs/allocator/graphic-allocate.js.map +1 -1
- package/cjs/application.d.ts +13 -5
- package/cjs/application.js +25 -2
- package/cjs/application.js.map +1 -1
- package/cjs/canvas/conical-gradient.js +2 -2
- package/cjs/canvas/conical-gradient.js.map +1 -1
- package/cjs/canvas/contributions/base-canvas.js +2 -2
- package/cjs/canvas/contributions/base-canvas.js.map +1 -1
- package/cjs/canvas/empty-context.js +3 -12
- package/cjs/canvas/empty-context.js.map +1 -1
- package/cjs/canvas/util.js +7 -3
- package/cjs/canvas/util.js.map +1 -1
- package/cjs/common/diff.js +2 -1
- package/cjs/common/enums.js +1 -2
- package/cjs/common/performance-raf.js +2 -2
- package/cjs/common/performance-raf.js.map +1 -1
- package/cjs/common/registry/contribution-registry.d.ts +24 -0
- package/cjs/common/registry/contribution-registry.js +61 -0
- package/cjs/common/registry/contribution-registry.js.map +1 -0
- package/cjs/common/registry/index.d.ts +5 -0
- package/cjs/common/registry/index.js +34 -0
- package/cjs/common/registry/index.js.map +1 -0
- package/cjs/common/registry/service-registry.d.ts +16 -0
- package/cjs/common/registry/service-registry.js +57 -0
- package/cjs/common/registry/service-registry.js.map +1 -0
- package/cjs/common/registry/types.d.ts +1 -0
- package/cjs/common/{inversify-lite/interfaces/interfaces.js → registry/types.js} +1 -1
- package/cjs/common/registry/types.js.map +1 -0
- package/cjs/common/simplify.js +2 -1
- package/cjs/common/sort.js +1 -2
- package/cjs/core/constants.js +1 -1
- package/cjs/core/contributions/env/base-contribution.js +4 -9
- package/cjs/core/contributions/env/base-contribution.js.map +1 -1
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +4 -13
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/cjs/core/contributions/layerHandler/empty-contribution.js +4 -13
- package/cjs/core/contributions/layerHandler/empty-contribution.js.map +1 -1
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js +4 -13
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
- package/cjs/core/contributions/modules.d.ts +1 -2
- package/cjs/core/contributions/modules.js +2 -14
- package/cjs/core/contributions/modules.js.map +1 -1
- package/cjs/core/contributions/textMeasure/AtextMeasure.js +3 -10
- package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
- package/cjs/core/contributions/textMeasure/textMeasure-contribution.js +3 -10
- package/cjs/core/contributions/textMeasure/textMeasure-contribution.js.map +1 -1
- package/cjs/core/contributions/window/base-contribution.js +3 -12
- package/cjs/core/contributions/window/base-contribution.js.map +1 -1
- package/cjs/core/global.d.ts +2 -2
- package/cjs/core/global.js +8 -20
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/graphic-utils.d.ts +2 -2
- package/cjs/core/graphic-utils.js +9 -23
- package/cjs/core/graphic-utils.js.map +1 -1
- package/cjs/core/layer-service.js +9 -18
- package/cjs/core/layer-service.js.map +1 -1
- package/cjs/core/layer.js +3 -3
- package/cjs/core/layer.js.map +1 -1
- package/cjs/core/stage.js +10 -8
- package/cjs/core/stage.js.map +1 -1
- package/cjs/core/window.js +7 -15
- package/cjs/core/window.js.map +1 -1
- package/cjs/env-check.js +3 -3
- package/cjs/env-check.js.map +1 -1
- package/cjs/graphic/arc.js +3 -3
- package/cjs/graphic/arc.js.map +1 -1
- package/cjs/graphic/arc3d.js +3 -3
- package/cjs/graphic/arc3d.js.map +1 -1
- package/cjs/graphic/area.js +3 -3
- package/cjs/graphic/area.js.map +1 -1
- package/cjs/graphic/circle.js +3 -3
- package/cjs/graphic/circle.js.map +1 -1
- package/cjs/graphic/glyph.js +1 -1
- package/cjs/graphic/glyph.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-service.d.ts +2 -2
- package/cjs/graphic/graphic-service/graphic-service.js +5 -18
- package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +1 -0
- package/cjs/graphic/graphic.js +12 -11
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/group.js +3 -4
- package/cjs/graphic/group.js.map +1 -1
- package/cjs/graphic/image.js +3 -3
- package/cjs/graphic/image.js.map +1 -1
- package/cjs/graphic/line.js +3 -3
- package/cjs/graphic/line.js.map +1 -1
- package/cjs/graphic/path.js +3 -3
- package/cjs/graphic/path.js.map +1 -1
- package/cjs/graphic/polygon.js +3 -3
- package/cjs/graphic/polygon.js.map +1 -1
- package/cjs/graphic/pyramid3d.js +2 -3
- package/cjs/graphic/pyramid3d.js.map +1 -1
- package/cjs/graphic/rect.js +3 -3
- package/cjs/graphic/rect.js.map +1 -1
- package/cjs/graphic/richtext/utils.js +3 -3
- package/cjs/graphic/richtext/utils.js.map +1 -1
- package/cjs/graphic/richtext.js +4 -4
- package/cjs/graphic/richtext.js.map +1 -1
- package/cjs/graphic/star.js +3 -3
- package/cjs/graphic/star.js.map +1 -1
- package/cjs/graphic/symbol.js +3 -3
- package/cjs/graphic/symbol.js.map +1 -1
- package/cjs/graphic/text.js +6 -7
- package/cjs/graphic/text.js.map +1 -1
- package/cjs/graphic/tools.js +2 -2
- package/cjs/graphic/tools.js.map +1 -1
- package/cjs/graphic/wrap-text.js +2 -2
- package/cjs/graphic/wrap-text.js.map +1 -1
- package/cjs/index.d.ts +3 -22
- package/cjs/index.js +59 -27
- package/cjs/index.js.map +1 -1
- package/cjs/interface/canvas.d.ts +1 -1
- package/cjs/interface/canvas.js.map +1 -1
- package/cjs/modules.js +6 -17
- package/cjs/modules.js.map +1 -1
- package/cjs/picker/global-picker-service.js +4 -13
- package/cjs/picker/global-picker-service.js.map +1 -1
- package/cjs/picker/pick-interceptor.js +9 -19
- package/cjs/picker/pick-interceptor.js.map +1 -1
- package/cjs/picker/picker-service.d.ts +3 -3
- package/cjs/picker/picker-service.js +8 -21
- package/cjs/picker/picker-service.js.map +1 -1
- package/cjs/plugins/builtin-plugin/auto-refresh-plugin.js +5 -6
- package/cjs/plugins/builtin-plugin/auto-refresh-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/edit-module.js +3 -4
- package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +8 -8
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js +2 -2
- package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/react-attribute-plugin.js +3 -3
- package/cjs/plugins/builtin-plugin/react-attribute-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +8 -10
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/cjs/plugins/plugin-service.d.ts +2 -2
- package/cjs/plugins/plugin-service.js +7 -21
- package/cjs/plugins/plugin-service.js.map +1 -1
- package/cjs/register-modules.d.ts +9 -0
- package/cjs/register-modules.js +79 -0
- package/cjs/register-modules.js.map +1 -0
- package/cjs/render/contributions/render/arc-render.d.ts +2 -2
- package/cjs/render/contributions/render/arc-render.js +7 -21
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/arc3d-render.js +3 -10
- package/cjs/render/contributions/render/arc3d-render.js.map +1 -1
- package/cjs/render/contributions/render/area-render.d.ts +2 -2
- package/cjs/render/contributions/render/area-render.js +7 -21
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/base-render.js +1 -1
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/circle-render.d.ts +2 -2
- package/cjs/render/contributions/render/circle-render.js +7 -21
- package/cjs/render/contributions/render/circle-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/base-contribution-render.d.ts +2 -2
- package/cjs/render/contributions/render/contributions/base-contribution-render.js +7 -20
- package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/image-contribution-render.d.ts +1 -2
- package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js +5 -13
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-contribution.d.ts +3 -3
- package/cjs/render/contributions/render/draw-contribution.js +9 -22
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js +3 -12
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/cjs/render/contributions/render/glyph-render.js +3 -10
- package/cjs/render/contributions/render/glyph-render.js.map +1 -1
- package/cjs/render/contributions/render/graphic-render.js +1 -10
- package/cjs/render/contributions/render/graphic-render.js.map +1 -1
- package/cjs/render/contributions/render/group-render.d.ts +2 -2
- package/cjs/render/contributions/render/group-render.js +7 -20
- package/cjs/render/contributions/render/group-render.js.map +1 -1
- package/cjs/render/contributions/render/image-render.d.ts +2 -2
- package/cjs/render/contributions/render/image-render.js +7 -21
- package/cjs/render/contributions/render/image-render.js.map +1 -1
- package/cjs/render/contributions/render/incremental-area-render.js +3 -10
- package/cjs/render/contributions/render/incremental-area-render.js.map +1 -1
- package/cjs/render/contributions/render/incremental-draw-contribution.d.ts +3 -5
- package/cjs/render/contributions/render/incremental-draw-contribution.js +10 -23
- package/cjs/render/contributions/render/incremental-draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/incremental-line-render.js +3 -10
- package/cjs/render/contributions/render/incremental-line-render.js.map +1 -1
- package/cjs/render/contributions/render/index.d.ts +12 -4
- package/cjs/render/contributions/render/index.js +11 -7
- package/cjs/render/contributions/render/index.js.map +1 -1
- package/cjs/render/contributions/render/line-render.js +3 -10
- package/cjs/render/contributions/render/line-render.js.map +1 -1
- package/cjs/render/contributions/render/path-render.d.ts +2 -2
- package/cjs/render/contributions/render/path-render.js +7 -21
- package/cjs/render/contributions/render/path-render.js.map +1 -1
- package/cjs/render/contributions/render/polygon-render.d.ts +2 -2
- package/cjs/render/contributions/render/polygon-render.js +7 -21
- package/cjs/render/contributions/render/polygon-render.js.map +1 -1
- package/cjs/render/contributions/render/pyramid3d-render.js +3 -10
- package/cjs/render/contributions/render/pyramid3d-render.js.map +1 -1
- package/cjs/render/contributions/render/rect-render.d.ts +2 -2
- package/cjs/render/contributions/render/rect-render.js +7 -21
- package/cjs/render/contributions/render/rect-render.js.map +1 -1
- package/cjs/render/contributions/render/rect3d-render.js +3 -10
- package/cjs/render/contributions/render/rect3d-render.js.map +1 -1
- package/cjs/render/contributions/render/richtext-render.js +3 -12
- package/cjs/render/contributions/render/richtext-render.js.map +1 -1
- package/cjs/render/contributions/render/star-render.d.ts +2 -2
- package/cjs/render/contributions/render/star-render.js +7 -21
- package/cjs/render/contributions/render/star-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.d.ts +2 -2
- package/cjs/render/contributions/render/symbol-render.js +7 -21
- package/cjs/render/contributions/render/symbol-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol.d.ts +2 -0
- package/cjs/render/contributions/render/symbol.js +3 -1
- package/cjs/render/contributions/render/symbol.js.map +1 -1
- package/cjs/render/contributions/render/text-render.d.ts +2 -2
- package/cjs/render/contributions/render/text-render.js +7 -21
- package/cjs/render/contributions/render/text-render.js.map +1 -1
- package/cjs/render/render-service.js +2 -18
- package/cjs/render/render-service.js.map +1 -1
- package/cjs/resource-loader/loader.js +6 -6
- package/cjs/resource-loader/loader.js.map +1 -1
- package/dist/index.es.js +20349 -21178
- package/es/allocator/canvas-allocate.js +8 -6
- package/es/allocator/canvas-allocate.js.map +1 -1
- package/es/allocator/graphic-allocate.js +17 -17
- package/es/allocator/graphic-allocate.js.map +1 -1
- package/es/application.d.ts +13 -5
- package/es/application.js +31 -2
- package/es/application.js.map +1 -1
- package/es/canvas/conical-gradient.js +2 -2
- package/es/canvas/conical-gradient.js.map +1 -1
- package/es/canvas/contributions/base-canvas.js +2 -2
- package/es/canvas/contributions/base-canvas.js.map +1 -1
- package/es/canvas/empty-context.js +2 -16
- package/es/canvas/empty-context.js.map +1 -1
- package/es/canvas/util.js +7 -5
- package/es/canvas/util.js.map +1 -1
- package/es/common/diff.js +2 -1
- package/es/common/enums.js +1 -2
- package/es/common/performance-raf.js +2 -2
- package/es/common/performance-raf.js.map +1 -1
- package/es/common/registry/contribution-registry.d.ts +24 -0
- package/es/common/registry/contribution-registry.js +55 -0
- package/es/common/registry/contribution-registry.js.map +1 -0
- package/es/common/registry/index.d.ts +5 -0
- package/es/common/registry/index.js +4 -0
- package/es/common/registry/index.js.map +1 -0
- package/es/common/registry/service-registry.d.ts +16 -0
- package/es/common/registry/service-registry.js +51 -0
- package/es/common/registry/service-registry.js.map +1 -0
- package/es/common/registry/types.d.ts +1 -0
- package/es/common/registry/types.js +2 -0
- package/es/common/registry/types.js.map +1 -0
- package/es/common/simplify.js +2 -1
- package/es/common/sort.js +1 -2
- package/es/core/constants.js +1 -1
- package/es/core/contributions/env/base-contribution.js +3 -13
- package/es/core/contributions/env/base-contribution.js.map +1 -1
- package/es/core/contributions/layerHandler/canvas2d-contribution.js +4 -18
- package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/es/core/contributions/layerHandler/empty-contribution.js +4 -18
- package/es/core/contributions/layerHandler/empty-contribution.js.map +1 -1
- package/es/core/contributions/layerHandler/offscreen2d-contribution.js +4 -18
- package/es/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
- package/es/core/contributions/modules.d.ts +1 -2
- package/es/core/contributions/modules.js +1 -9
- package/es/core/contributions/modules.js.map +1 -1
- package/es/core/contributions/textMeasure/AtextMeasure.js +2 -14
- package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
- package/es/core/contributions/textMeasure/textMeasure-contribution.js +2 -14
- package/es/core/contributions/textMeasure/textMeasure-contribution.js.map +1 -1
- package/es/core/contributions/window/base-contribution.js +2 -16
- package/es/core/contributions/window/base-contribution.js.map +1 -1
- package/es/core/global.d.ts +2 -2
- package/es/core/global.js +9 -24
- package/es/core/global.js.map +1 -1
- package/es/core/graphic-utils.d.ts +2 -2
- package/es/core/graphic-utils.js +12 -34
- package/es/core/graphic-utils.js.map +1 -1
- package/es/core/layer-service.js +10 -23
- package/es/core/layer-service.js.map +1 -1
- package/es/core/layer.js +3 -3
- package/es/core/layer.js.map +1 -1
- package/es/core/stage.js +10 -10
- package/es/core/stage.js.map +1 -1
- package/es/core/window.js +9 -23
- package/es/core/window.js.map +1 -1
- package/es/env-check.js +3 -3
- package/es/env-check.js.map +1 -1
- package/es/graphic/arc.js +3 -3
- package/es/graphic/arc.js.map +1 -1
- package/es/graphic/arc3d.js +3 -4
- package/es/graphic/arc3d.js.map +1 -1
- package/es/graphic/area.js +3 -3
- package/es/graphic/area.js.map +1 -1
- package/es/graphic/circle.js +3 -3
- package/es/graphic/circle.js.map +1 -1
- package/es/graphic/glyph.js +1 -1
- package/es/graphic/glyph.js.map +1 -1
- package/es/graphic/graphic-service/graphic-service.d.ts +2 -2
- package/es/graphic/graphic-service/graphic-service.js +5 -21
- package/es/graphic/graphic-service/graphic-service.js.map +1 -1
- package/es/graphic/graphic.d.ts +1 -0
- package/es/graphic/graphic.js +14 -9
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/group.js +3 -3
- package/es/graphic/group.js.map +1 -1
- package/es/graphic/image.js +3 -3
- package/es/graphic/image.js.map +1 -1
- package/es/graphic/line.js +3 -3
- package/es/graphic/line.js.map +1 -1
- package/es/graphic/path.js +3 -3
- package/es/graphic/path.js.map +1 -1
- package/es/graphic/polygon.js +3 -3
- package/es/graphic/polygon.js.map +1 -1
- package/es/graphic/pyramid3d.js +2 -2
- package/es/graphic/pyramid3d.js.map +1 -1
- package/es/graphic/rect.js +3 -3
- package/es/graphic/rect.js.map +1 -1
- package/es/graphic/richtext/utils.js +3 -3
- package/es/graphic/richtext/utils.js.map +1 -1
- package/es/graphic/richtext.js +4 -4
- package/es/graphic/richtext.js.map +1 -1
- package/es/graphic/star.js +3 -3
- package/es/graphic/star.js.map +1 -1
- package/es/graphic/symbol.js +3 -3
- package/es/graphic/symbol.js.map +1 -1
- package/es/graphic/text.js +6 -6
- package/es/graphic/text.js.map +1 -1
- package/es/graphic/tools.js +2 -2
- package/es/graphic/tools.js.map +1 -1
- package/es/graphic/wrap-text.js +2 -2
- package/es/graphic/wrap-text.js.map +1 -1
- package/es/index.d.ts +3 -22
- package/es/index.js +3 -41
- package/es/index.js.map +1 -1
- package/es/interface/canvas.d.ts +1 -1
- package/es/interface/canvas.js.map +1 -1
- package/es/modules.js +10 -36
- package/es/modules.js.map +1 -1
- package/es/picker/global-picker-service.js +4 -18
- package/es/picker/global-picker-service.js.map +1 -1
- package/es/picker/pick-interceptor.js +8 -32
- package/es/picker/pick-interceptor.js.map +1 -1
- package/es/picker/picker-service.d.ts +3 -3
- package/es/picker/picker-service.js +10 -25
- package/es/picker/picker-service.js.map +1 -1
- package/es/plugins/builtin-plugin/auto-refresh-plugin.js +6 -6
- package/es/plugins/builtin-plugin/auto-refresh-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/edit-module.js +3 -3
- package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/html-attribute-plugin.js +8 -8
- package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js +2 -2
- package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/react-attribute-plugin.js +3 -3
- package/es/plugins/builtin-plugin/react-attribute-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +6 -6
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/es/plugins/plugin-service.d.ts +2 -2
- package/es/plugins/plugin-service.js +7 -26
- package/es/plugins/plugin-service.js.map +1 -1
- package/es/register-modules.d.ts +9 -0
- package/es/register-modules.js +117 -0
- package/es/register-modules.js.map +1 -0
- package/es/render/contributions/render/arc-render.d.ts +2 -2
- package/es/render/contributions/render/arc-render.js +8 -25
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/arc3d-render.js +2 -14
- package/es/render/contributions/render/arc3d-render.js.map +1 -1
- package/es/render/contributions/render/area-render.d.ts +2 -2
- package/es/render/contributions/render/area-render.js +8 -25
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/base-render.js +1 -1
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/circle-render.d.ts +2 -2
- package/es/render/contributions/render/circle-render.js +8 -25
- package/es/render/contributions/render/circle-render.js.map +1 -1
- package/es/render/contributions/render/contributions/base-contribution-render.d.ts +2 -2
- package/es/render/contributions/render/contributions/base-contribution-render.js +8 -24
- package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/image-contribution-render.d.ts +1 -2
- package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/rect-contribution-render.js +4 -20
- package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/es/render/contributions/render/draw-contribution.d.ts +3 -3
- package/es/render/contributions/render/draw-contribution.js +11 -29
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.js +2 -16
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/es/render/contributions/render/glyph-render.js +2 -14
- package/es/render/contributions/render/glyph-render.js.map +1 -1
- package/es/render/contributions/render/graphic-render.js +1 -13
- package/es/render/contributions/render/graphic-render.js.map +1 -1
- package/es/render/contributions/render/group-render.d.ts +2 -2
- package/es/render/contributions/render/group-render.js +9 -25
- package/es/render/contributions/render/group-render.js.map +1 -1
- package/es/render/contributions/render/image-render.d.ts +2 -2
- package/es/render/contributions/render/image-render.js +8 -25
- package/es/render/contributions/render/image-render.js.map +1 -1
- package/es/render/contributions/render/incremental-area-render.js +2 -14
- package/es/render/contributions/render/incremental-area-render.js.map +1 -1
- package/es/render/contributions/render/incremental-draw-contribution.d.ts +3 -5
- package/es/render/contributions/render/incremental-draw-contribution.js +12 -30
- package/es/render/contributions/render/incremental-draw-contribution.js.map +1 -1
- package/es/render/contributions/render/incremental-line-render.js +2 -14
- package/es/render/contributions/render/incremental-line-render.js.map +1 -1
- package/es/render/contributions/render/index.d.ts +12 -4
- package/es/render/contributions/render/index.js +24 -8
- package/es/render/contributions/render/index.js.map +1 -1
- package/es/render/contributions/render/line-render.js +2 -14
- package/es/render/contributions/render/line-render.js.map +1 -1
- package/es/render/contributions/render/path-render.d.ts +2 -2
- package/es/render/contributions/render/path-render.js +8 -25
- package/es/render/contributions/render/path-render.js.map +1 -1
- package/es/render/contributions/render/polygon-render.d.ts +2 -2
- package/es/render/contributions/render/polygon-render.js +8 -25
- package/es/render/contributions/render/polygon-render.js.map +1 -1
- package/es/render/contributions/render/pyramid3d-render.js +2 -14
- package/es/render/contributions/render/pyramid3d-render.js.map +1 -1
- package/es/render/contributions/render/rect-render.d.ts +2 -2
- package/es/render/contributions/render/rect-render.js +8 -25
- package/es/render/contributions/render/rect-render.js.map +1 -1
- package/es/render/contributions/render/rect3d-render.js +2 -14
- package/es/render/contributions/render/rect3d-render.js.map +1 -1
- package/es/render/contributions/render/richtext-render.js +2 -16
- package/es/render/contributions/render/richtext-render.js.map +1 -1
- package/es/render/contributions/render/star-render.d.ts +2 -2
- package/es/render/contributions/render/star-render.js +8 -25
- package/es/render/contributions/render/star-render.js.map +1 -1
- package/es/render/contributions/render/symbol-render.d.ts +2 -2
- package/es/render/contributions/render/symbol-render.js +8 -25
- package/es/render/contributions/render/symbol-render.js.map +1 -1
- package/es/render/contributions/render/symbol.d.ts +2 -0
- package/es/render/contributions/render/symbol.js +4 -0
- package/es/render/contributions/render/symbol.js.map +1 -1
- package/es/render/contributions/render/text-render.d.ts +2 -2
- package/es/render/contributions/render/text-render.js +7 -24
- package/es/render/contributions/render/text-render.js.map +1 -1
- package/es/render/render-service.js +2 -22
- package/es/render/render-service.js.map +1 -1
- package/es/resource-loader/loader.js +6 -6
- package/es/resource-loader/loader.js.map +1 -1
- package/package.json +1 -1
- package/cjs/common/contribution-provider.d.ts +0 -20
- package/cjs/common/contribution-provider.js +0 -46
- package/cjs/common/contribution-provider.js.map +0 -1
- package/cjs/common/inversify/annotation/inject.d.ts +0 -1
- package/cjs/common/inversify/annotation/inject.js +0 -10
- package/cjs/common/inversify/annotation/inject.js.map +0 -1
- package/cjs/common/inversify/annotation/inject_base.d.ts +0 -14
- package/cjs/common/inversify/annotation/inject_base.js +0 -39
- package/cjs/common/inversify/annotation/inject_base.js.map +0 -1
- package/cjs/common/inversify/annotation/injectable.d.ts +0 -1
- package/cjs/common/inversify/annotation/injectable.js +0 -46
- package/cjs/common/inversify/annotation/injectable.js.map +0 -1
- package/cjs/common/inversify/annotation/multi_inject.d.ts +0 -1
- package/cjs/common/inversify/annotation/multi_inject.js +0 -10
- package/cjs/common/inversify/annotation/multi_inject.js.map +0 -1
- package/cjs/common/inversify/annotation/named.d.ts +0 -1
- package/cjs/common/inversify/annotation/named.js +0 -14
- package/cjs/common/inversify/annotation/named.js.map +0 -1
- package/cjs/common/inversify/annotation/optional.d.ts +0 -2
- package/cjs/common/inversify/annotation/optional.js +0 -14
- package/cjs/common/inversify/annotation/optional.js.map +0 -1
- package/cjs/common/inversify/binding.d.ts +0 -18
- package/cjs/common/inversify/binding.js +0 -26
- package/cjs/common/inversify/binding.js.map +0 -1
- package/cjs/common/inversify/container.d.ts +0 -28
- package/cjs/common/inversify/container.js +0 -158
- package/cjs/common/inversify/container.js.map +0 -1
- package/cjs/common/inversify/cotainer-module.d.ts +0 -6
- package/cjs/common/inversify/cotainer-module.js +0 -16
- package/cjs/common/inversify/cotainer-module.js.map +0 -1
- package/cjs/common/inversify/index.d.ts +0 -7
- package/cjs/common/inversify/index.js +0 -75
- package/cjs/common/inversify/index.js.map +0 -1
- package/cjs/common/inversify/interfaces.d.ts +0 -218
- package/cjs/common/inversify/interfaces.js +0 -6
- package/cjs/common/inversify/interfaces.js.map +0 -1
- package/cjs/common/inversify/literal_types.d.ts +0 -5
- package/cjs/common/inversify/literal_types.js +0 -34
- package/cjs/common/inversify/literal_types.js.map +0 -1
- package/cjs/common/inversify/meta-data.d.ts +0 -6
- package/cjs/common/inversify/meta-data.js +0 -19
- package/cjs/common/inversify/meta-data.js.map +0 -1
- package/cjs/common/inversify/metadata_keys.d.ts +0 -12
- package/cjs/common/inversify/metadata_keys.js +0 -15
- package/cjs/common/inversify/metadata_keys.js.map +0 -1
- package/cjs/common/inversify/metadata_reader.d.ts +0 -6
- package/cjs/common/inversify/metadata_reader.js +0 -28
- package/cjs/common/inversify/metadata_reader.js.map +0 -1
- package/cjs/common/inversify/syntax/binding_in_syntax.d.ts +0 -10
- package/cjs/common/inversify/syntax/binding_in_syntax.js +0 -29
- package/cjs/common/inversify/syntax/binding_in_syntax.js.map +0 -1
- package/cjs/common/inversify/syntax/binding_to_syntax.d.ts +0 -12
- package/cjs/common/inversify/syntax/binding_to_syntax.js +0 -40
- package/cjs/common/inversify/syntax/binding_to_syntax.js.map +0 -1
- package/cjs/common/inversify/syntax/constraint_helpers.d.ts +0 -2
- package/cjs/common/inversify/syntax/constraint_helpers.js +0 -20
- package/cjs/common/inversify/syntax/constraint_helpers.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/decorator_utils.d.ts +0 -16
- package/cjs/common/inversify-lite/annotation/decorator_utils.js +0 -97
- package/cjs/common/inversify-lite/annotation/decorator_utils.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/inject.d.ts +0 -2
- package/cjs/common/inversify-lite/annotation/inject.js +0 -36
- package/cjs/common/inversify-lite/annotation/inject.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/inject_base.d.ts +0 -3
- package/cjs/common/inversify-lite/annotation/inject_base.js +0 -20
- package/cjs/common/inversify-lite/annotation/inject_base.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/injectable.d.ts +0 -2
- package/cjs/common/inversify-lite/annotation/injectable.js +0 -48
- package/cjs/common/inversify-lite/annotation/injectable.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/lazy_service_identifier.d.ts +0 -7
- package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js +0 -17
- package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/multi_inject.d.ts +0 -2
- package/cjs/common/inversify-lite/annotation/multi_inject.js +0 -36
- package/cjs/common/inversify-lite/annotation/multi_inject.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/named.d.ts +0 -2
- package/cjs/common/inversify-lite/annotation/named.js +0 -39
- package/cjs/common/inversify-lite/annotation/named.js.map +0 -1
- package/cjs/common/inversify-lite/annotation/property_event_decorator.d.ts +0 -4
- package/cjs/common/inversify-lite/annotation/property_event_decorator.js +0 -24
- package/cjs/common/inversify-lite/annotation/property_event_decorator.js.map +0 -1
- package/cjs/common/inversify-lite/bindings/binding.d.ts +0 -20
- package/cjs/common/inversify-lite/bindings/binding.js +0 -27
- package/cjs/common/inversify-lite/bindings/binding.js.map +0 -1
- package/cjs/common/inversify-lite/bindings/binding_count.d.ts +0 -5
- package/cjs/common/inversify-lite/bindings/binding_count.js +0 -10
- package/cjs/common/inversify-lite/bindings/binding_count.js.map +0 -1
- package/cjs/common/inversify-lite/constants/error_msgs.d.ts +0 -32
- package/cjs/common/inversify-lite/constants/error_msgs.js +0 -50
- package/cjs/common/inversify-lite/constants/error_msgs.js.map +0 -1
- package/cjs/common/inversify-lite/constants/literal_types.d.ts +0 -5
- package/cjs/common/inversify-lite/constants/literal_types.js +0 -35
- package/cjs/common/inversify-lite/constants/literal_types.js.map +0 -1
- package/cjs/common/inversify-lite/constants/metadata_keys.d.ts +0 -13
- package/cjs/common/inversify-lite/constants/metadata_keys.js +0 -16
- package/cjs/common/inversify-lite/constants/metadata_keys.js.map +0 -1
- package/cjs/common/inversify-lite/container/container.d.ts +0 -46
- package/cjs/common/inversify-lite/container/container.js +0 -290
- package/cjs/common/inversify-lite/container/container.js.map +0 -1
- package/cjs/common/inversify-lite/container/container_module.d.ts +0 -11
- package/cjs/common/inversify-lite/container/container_module.js +0 -24
- package/cjs/common/inversify-lite/container/container_module.js.map +0 -1
- package/cjs/common/inversify-lite/container/lookup.d.ts +0 -16
- package/cjs/common/inversify-lite/container/lookup.js +0 -97
- package/cjs/common/inversify-lite/container/lookup.js.map +0 -1
- package/cjs/common/inversify-lite/index.d.ts +0 -1
- package/cjs/common/inversify-lite/index.js +0 -21
- package/cjs/common/inversify-lite/index.js.map +0 -1
- package/cjs/common/inversify-lite/interfaces/interfaces.d.ts +0 -237
- package/cjs/common/inversify-lite/interfaces/interfaces.js.map +0 -1
- package/cjs/common/inversify-lite/planning/context.d.ts +0 -11
- package/cjs/common/inversify-lite/planning/context.js +0 -22
- package/cjs/common/inversify-lite/planning/context.js.map +0 -1
- package/cjs/common/inversify-lite/planning/metadata.d.ts +0 -8
- package/cjs/common/inversify-lite/planning/metadata.js +0 -44
- package/cjs/common/inversify-lite/planning/metadata.js.map +0 -1
- package/cjs/common/inversify-lite/planning/metadata_reader.d.ts +0 -6
- package/cjs/common/inversify-lite/planning/metadata_reader.js +0 -51
- package/cjs/common/inversify-lite/planning/metadata_reader.js.map +0 -1
- package/cjs/common/inversify-lite/planning/plan.d.ts +0 -7
- package/cjs/common/inversify-lite/planning/plan.js +0 -14
- package/cjs/common/inversify-lite/planning/plan.js.map +0 -1
- package/cjs/common/inversify-lite/planning/planner.d.ts +0 -5
- package/cjs/common/inversify-lite/planning/planner.js +0 -132
- package/cjs/common/inversify-lite/planning/planner.js.map +0 -1
- package/cjs/common/inversify-lite/planning/queryable_string.d.ts +0 -9
- package/cjs/common/inversify-lite/planning/queryable_string.js +0 -23
- package/cjs/common/inversify-lite/planning/queryable_string.js.map +0 -1
- package/cjs/common/inversify-lite/planning/reflection_utils.d.ts +0 -5
- package/cjs/common/inversify-lite/planning/reflection_utils.js +0 -129
- package/cjs/common/inversify-lite/planning/reflection_utils.js.map +0 -1
- package/cjs/common/inversify-lite/planning/request.d.ts +0 -14
- package/cjs/common/inversify-lite/planning/request.js +0 -22
- package/cjs/common/inversify-lite/planning/request.js.map +0 -1
- package/cjs/common/inversify-lite/planning/target.d.ts +0 -23
- package/cjs/common/inversify-lite/planning/target.js +0 -81
- package/cjs/common/inversify-lite/planning/target.js.map +0 -1
- package/cjs/common/inversify-lite/resolution/instantiation.d.ts +0 -3
- package/cjs/common/inversify-lite/resolution/instantiation.js +0 -143
- package/cjs/common/inversify-lite/resolution/instantiation.js.map +0 -1
- package/cjs/common/inversify-lite/resolution/resolver.d.ts +0 -3
- package/cjs/common/inversify-lite/resolution/resolver.js +0 -74
- package/cjs/common/inversify-lite/resolution/resolver.js.map +0 -1
- package/cjs/common/inversify-lite/scope/scope.d.ts +0 -3
- package/cjs/common/inversify-lite/scope/scope.js +0 -56
- package/cjs/common/inversify-lite/scope/scope.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_in_syntax.d.ts +0 -9
- package/cjs/common/inversify-lite/syntax/binding_in_syntax.js +0 -25
- package/cjs/common/inversify-lite/syntax/binding_in_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.d.ts +0 -12
- package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -29
- package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_on_syntax.d.ts +0 -6
- package/cjs/common/inversify-lite/syntax/binding_on_syntax.js +0 -14
- package/cjs/common/inversify-lite/syntax/binding_on_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_to_syntax.d.ts +0 -18
- package/cjs/common/inversify-lite/syntax/binding_to_syntax.js +0 -88
- package/cjs/common/inversify-lite/syntax/binding_to_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.d.ts +0 -8
- package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -19
- package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/binding_when_syntax.d.ts +0 -7
- package/cjs/common/inversify-lite/syntax/binding_when_syntax.js +0 -20
- package/cjs/common/inversify-lite/syntax/binding_when_syntax.js.map +0 -1
- package/cjs/common/inversify-lite/syntax/constraint_helpers.d.ts +0 -3
- package/cjs/common/inversify-lite/syntax/constraint_helpers.js +0 -38
- package/cjs/common/inversify-lite/syntax/constraint_helpers.js.map +0 -1
- package/cjs/common/inversify-lite/utils/async.d.ts +0 -3
- package/cjs/common/inversify-lite/utils/async.js +0 -15
- package/cjs/common/inversify-lite/utils/async.js.map +0 -1
- package/cjs/common/inversify-lite/utils/binding_utils.d.ts +0 -4
- package/cjs/common/inversify-lite/utils/binding_utils.js +0 -94
- package/cjs/common/inversify-lite/utils/binding_utils.js.map +0 -1
- package/cjs/common/inversify-lite/utils/clonable.d.ts +0 -3
- package/cjs/common/inversify-lite/utils/clonable.js +0 -10
- package/cjs/common/inversify-lite/utils/clonable.js.map +0 -1
- package/cjs/common/inversify-lite/utils/exceptions.d.ts +0 -2
- package/cjs/common/inversify-lite/utils/exceptions.js +0 -43
- package/cjs/common/inversify-lite/utils/exceptions.js.map +0 -1
- package/cjs/common/inversify-lite/utils/factory_type.d.ts +0 -5
- package/cjs/common/inversify-lite/utils/factory_type.js +0 -11
- package/cjs/common/inversify-lite/utils/factory_type.js.map +0 -1
- package/cjs/common/inversify-lite/utils/id.d.ts +0 -2
- package/cjs/common/inversify-lite/utils/id.js +0 -14
- package/cjs/common/inversify-lite/utils/id.js.map +0 -1
- package/cjs/common/inversify-lite/utils/js.d.ts +0 -1
- package/cjs/common/inversify-lite/utils/js.js +0 -14
- package/cjs/common/inversify-lite/utils/js.js.map +0 -1
- package/cjs/common/inversify-lite/utils/serialization.d.ts +0 -10
- package/cjs/common/inversify-lite/utils/serialization.js +0 -99
- package/cjs/common/inversify-lite/utils/serialization.js.map +0 -1
- package/cjs/container.d.ts +0 -2
- package/cjs/container.js +0 -10
- package/cjs/container.js.map +0 -1
- package/cjs/core/contributions/env/modules.d.ts +0 -3
- package/cjs/core/contributions/env/modules.js +0 -12
- package/cjs/core/contributions/env/modules.js.map +0 -1
- package/cjs/core/contributions/layerHandler/modules.d.ts +0 -3
- package/cjs/core/contributions/layerHandler/modules.js +0 -12
- package/cjs/core/contributions/layerHandler/modules.js.map +0 -1
- package/cjs/core/contributions/textMeasure/modules.d.ts +0 -3
- package/cjs/core/contributions/textMeasure/modules.js +0 -13
- package/cjs/core/contributions/textMeasure/modules.js.map +0 -1
- package/cjs/core/core-modules.d.ts +0 -3
- package/cjs/core/core-modules.js +0 -15
- package/cjs/core/core-modules.js.map +0 -1
- package/cjs/core/global-module.d.ts +0 -1
- package/cjs/core/global-module.js +0 -3
- package/cjs/core/global-module.js.map +0 -1
- package/cjs/graphic/graphic-service/graphic-module.d.ts +0 -3
- package/cjs/graphic/graphic-service/graphic-module.js +0 -12
- package/cjs/graphic/graphic-service/graphic-module.js.map +0 -1
- package/cjs/picker/pick-modules.d.ts +0 -3
- package/cjs/picker/pick-modules.js +0 -22
- package/cjs/picker/pick-modules.js.map +0 -1
- package/cjs/plugins/plugin-modules.d.ts +0 -3
- package/cjs/plugins/plugin-modules.js +0 -12
- package/cjs/plugins/plugin-modules.js.map +0 -1
- package/cjs/render/contributions/modules.d.ts +0 -2
- package/cjs/render/contributions/modules.js +0 -20
- package/cjs/render/contributions/modules.js.map +0 -1
- package/cjs/render/contributions/render/arc-module.d.ts +0 -2
- package/cjs/render/contributions/render/arc-module.js +0 -17
- package/cjs/render/contributions/render/arc-module.js.map +0 -1
- package/cjs/render/contributions/render/arc3d-module.d.ts +0 -2
- package/cjs/render/contributions/render/arc3d-module.js +0 -15
- package/cjs/render/contributions/render/arc3d-module.js.map +0 -1
- package/cjs/render/contributions/render/area-module.d.ts +0 -2
- package/cjs/render/contributions/render/area-module.js +0 -18
- package/cjs/render/contributions/render/area-module.js.map +0 -1
- package/cjs/render/contributions/render/circle-module.d.ts +0 -2
- package/cjs/render/contributions/render/circle-module.js +0 -17
- package/cjs/render/contributions/render/circle-module.js.map +0 -1
- package/cjs/render/contributions/render/glyph-module.d.ts +0 -2
- package/cjs/render/contributions/render/glyph-module.js +0 -15
- package/cjs/render/contributions/render/glyph-module.js.map +0 -1
- package/cjs/render/contributions/render/image-module.d.ts +0 -2
- package/cjs/render/contributions/render/image-module.js +0 -16
- package/cjs/render/contributions/render/image-module.js.map +0 -1
- package/cjs/render/contributions/render/line-module.d.ts +0 -2
- package/cjs/render/contributions/render/line-module.js +0 -17
- package/cjs/render/contributions/render/line-module.js.map +0 -1
- package/cjs/render/contributions/render/module.d.ts +0 -3
- package/cjs/render/contributions/render/module.js +0 -23
- package/cjs/render/contributions/render/module.js.map +0 -1
- package/cjs/render/contributions/render/path-module.d.ts +0 -2
- package/cjs/render/contributions/render/path-module.js +0 -17
- package/cjs/render/contributions/render/path-module.js.map +0 -1
- package/cjs/render/contributions/render/polygon-module.d.ts +0 -2
- package/cjs/render/contributions/render/polygon-module.js +0 -16
- package/cjs/render/contributions/render/polygon-module.js.map +0 -1
- package/cjs/render/contributions/render/pyramid3d-module.d.ts +0 -2
- package/cjs/render/contributions/render/pyramid3d-module.js +0 -15
- package/cjs/render/contributions/render/pyramid3d-module.js.map +0 -1
- package/cjs/render/contributions/render/rect-module.d.ts +0 -2
- package/cjs/render/contributions/render/rect-module.js +0 -20
- package/cjs/render/contributions/render/rect-module.js.map +0 -1
- package/cjs/render/contributions/render/rect3d-module.d.ts +0 -2
- package/cjs/render/contributions/render/rect3d-module.js +0 -15
- package/cjs/render/contributions/render/rect3d-module.js.map +0 -1
- package/cjs/render/contributions/render/richtext-module.d.ts +0 -2
- package/cjs/render/contributions/render/richtext-module.js +0 -15
- package/cjs/render/contributions/render/richtext-module.js.map +0 -1
- package/cjs/render/contributions/render/star-module.d.ts +0 -2
- package/cjs/render/contributions/render/star-module.js +0 -15
- package/cjs/render/contributions/render/star-module.js.map +0 -1
- package/cjs/render/contributions/render/symbol-module.d.ts +0 -2
- package/cjs/render/contributions/render/symbol-module.js +0 -17
- package/cjs/render/contributions/render/symbol-module.js.map +0 -1
- package/cjs/render/contributions/render/text-module.d.ts +0 -2
- package/cjs/render/contributions/render/text-module.js +0 -16
- package/cjs/render/contributions/render/text-module.js.map +0 -1
- package/cjs/render/render-modules.d.ts +0 -3
- package/cjs/render/render-modules.js +0 -12
- package/cjs/render/render-modules.js.map +0 -1
- package/es/common/contribution-provider.d.ts +0 -20
- package/es/common/contribution-provider.js +0 -39
- package/es/common/contribution-provider.js.map +0 -1
- package/es/common/inversify/annotation/inject.d.ts +0 -1
- package/es/common/inversify/annotation/inject.js +0 -6
- package/es/common/inversify/annotation/inject.js.map +0 -1
- package/es/common/inversify/annotation/inject_base.d.ts +0 -14
- package/es/common/inversify/annotation/inject_base.js +0 -29
- package/es/common/inversify/annotation/inject_base.js.map +0 -1
- package/es/common/inversify/annotation/injectable.d.ts +0 -1
- package/es/common/inversify/annotation/injectable.js +0 -10
- package/es/common/inversify/annotation/injectable.js.map +0 -1
- package/es/common/inversify/annotation/multi_inject.d.ts +0 -1
- package/es/common/inversify/annotation/multi_inject.js +0 -6
- package/es/common/inversify/annotation/multi_inject.js.map +0 -1
- package/es/common/inversify/annotation/named.d.ts +0 -1
- package/es/common/inversify/annotation/named.js +0 -10
- package/es/common/inversify/annotation/named.js.map +0 -1
- package/es/common/inversify/annotation/optional.d.ts +0 -2
- package/es/common/inversify/annotation/optional.js +0 -12
- package/es/common/inversify/annotation/optional.js.map +0 -1
- package/es/common/inversify/binding.d.ts +0 -18
- package/es/common/inversify/binding.js +0 -22
- package/es/common/inversify/binding.js.map +0 -1
- package/es/common/inversify/container.d.ts +0 -28
- package/es/common/inversify/container.js +0 -158
- package/es/common/inversify/container.js.map +0 -1
- package/es/common/inversify/cotainer-module.d.ts +0 -6
- package/es/common/inversify/cotainer-module.js +0 -8
- package/es/common/inversify/cotainer-module.js.map +0 -1
- package/es/common/inversify/index.d.ts +0 -7
- package/es/common/inversify/index.js +0 -14
- package/es/common/inversify/index.js.map +0 -1
- package/es/common/inversify/interfaces.d.ts +0 -218
- package/es/common/inversify/interfaces.js +0 -2
- package/es/common/inversify/interfaces.js.map +0 -1
- package/es/common/inversify/literal_types.d.ts +0 -5
- package/es/common/inversify/literal_types.js +0 -20
- package/es/common/inversify/literal_types.js.map +0 -1
- package/es/common/inversify/meta-data.d.ts +0 -6
- package/es/common/inversify/meta-data.js +0 -11
- package/es/common/inversify/meta-data.js.map +0 -1
- package/es/common/inversify/metadata_keys.d.ts +0 -12
- package/es/common/inversify/metadata_keys.js +0 -28
- package/es/common/inversify/metadata_keys.js.map +0 -1
- package/es/common/inversify/metadata_reader.d.ts +0 -6
- package/es/common/inversify/metadata_reader.js +0 -18
- package/es/common/inversify/metadata_reader.js.map +0 -1
- package/es/common/inversify/syntax/binding_in_syntax.d.ts +0 -10
- package/es/common/inversify/syntax/binding_in_syntax.js +0 -24
- package/es/common/inversify/syntax/binding_in_syntax.js.map +0 -1
- package/es/common/inversify/syntax/binding_to_syntax.d.ts +0 -12
- package/es/common/inversify/syntax/binding_to_syntax.js +0 -36
- package/es/common/inversify/syntax/binding_to_syntax.js.map +0 -1
- package/es/common/inversify/syntax/constraint_helpers.d.ts +0 -2
- package/es/common/inversify/syntax/constraint_helpers.js +0 -18
- package/es/common/inversify/syntax/constraint_helpers.js.map +0 -1
- package/es/common/inversify-lite/annotation/decorator_utils.d.ts +0 -16
- package/es/common/inversify-lite/annotation/decorator_utils.js +0 -67
- package/es/common/inversify-lite/annotation/decorator_utils.js.map +0 -1
- package/es/common/inversify-lite/annotation/inject.d.ts +0 -2
- package/es/common/inversify-lite/annotation/inject.js +0 -8
- package/es/common/inversify-lite/annotation/inject.js.map +0 -1
- package/es/common/inversify-lite/annotation/inject_base.d.ts +0 -3
- package/es/common/inversify-lite/annotation/inject_base.js +0 -16
- package/es/common/inversify-lite/annotation/inject_base.js.map +0 -1
- package/es/common/inversify-lite/annotation/injectable.d.ts +0 -2
- package/es/common/inversify-lite/annotation/injectable.js +0 -16
- package/es/common/inversify-lite/annotation/injectable.js.map +0 -1
- package/es/common/inversify-lite/annotation/lazy_service_identifier.d.ts +0 -7
- package/es/common/inversify-lite/annotation/lazy_service_identifier.js +0 -9
- package/es/common/inversify-lite/annotation/lazy_service_identifier.js.map +0 -1
- package/es/common/inversify-lite/annotation/multi_inject.d.ts +0 -2
- package/es/common/inversify-lite/annotation/multi_inject.js +0 -8
- package/es/common/inversify-lite/annotation/multi_inject.js.map +0 -1
- package/es/common/inversify-lite/annotation/named.d.ts +0 -2
- package/es/common/inversify-lite/annotation/named.js +0 -12
- package/es/common/inversify-lite/annotation/named.js.map +0 -1
- package/es/common/inversify-lite/annotation/property_event_decorator.d.ts +0 -4
- package/es/common/inversify-lite/annotation/property_event_decorator.js +0 -14
- package/es/common/inversify-lite/annotation/property_event_decorator.js.map +0 -1
- package/es/common/inversify-lite/bindings/binding.d.ts +0 -20
- package/es/common/inversify-lite/bindings/binding.js +0 -23
- package/es/common/inversify-lite/bindings/binding.js.map +0 -1
- package/es/common/inversify-lite/bindings/binding_count.d.ts +0 -5
- package/es/common/inversify-lite/bindings/binding_count.js +0 -6
- package/es/common/inversify-lite/bindings/binding_count.js.map +0 -1
- package/es/common/inversify-lite/constants/error_msgs.d.ts +0 -32
- package/es/common/inversify-lite/constants/error_msgs.js +0 -64
- package/es/common/inversify-lite/constants/error_msgs.js.map +0 -1
- package/es/common/inversify-lite/constants/literal_types.d.ts +0 -5
- package/es/common/inversify-lite/constants/literal_types.js +0 -21
- package/es/common/inversify-lite/constants/literal_types.js.map +0 -1
- package/es/common/inversify-lite/constants/metadata_keys.d.ts +0 -13
- package/es/common/inversify-lite/constants/metadata_keys.js +0 -30
- package/es/common/inversify-lite/constants/metadata_keys.js.map +0 -1
- package/es/common/inversify-lite/container/container.d.ts +0 -46
- package/es/common/inversify-lite/container/container.js +0 -279
- package/es/common/inversify-lite/container/container.js.map +0 -1
- package/es/common/inversify-lite/container/container_module.d.ts +0 -11
- package/es/common/inversify-lite/container/container_module.js +0 -14
- package/es/common/inversify-lite/container/container_module.js.map +0 -1
- package/es/common/inversify-lite/container/lookup.d.ts +0 -16
- package/es/common/inversify-lite/container/lookup.js +0 -68
- package/es/common/inversify-lite/container/lookup.js.map +0 -1
- package/es/common/inversify-lite/index.d.ts +0 -1
- package/es/common/inversify-lite/index.js +0 -2
- package/es/common/inversify-lite/index.js.map +0 -1
- package/es/common/inversify-lite/interfaces/interfaces.d.ts +0 -237
- package/es/common/inversify-lite/interfaces/interfaces.js +0 -2
- package/es/common/inversify-lite/interfaces/interfaces.js.map +0 -1
- package/es/common/inversify-lite/planning/context.d.ts +0 -11
- package/es/common/inversify-lite/planning/context.js +0 -16
- package/es/common/inversify-lite/planning/context.js.map +0 -1
- package/es/common/inversify-lite/planning/metadata.d.ts +0 -8
- package/es/common/inversify-lite/planning/metadata.js +0 -13
- package/es/common/inversify-lite/planning/metadata.js.map +0 -1
- package/es/common/inversify-lite/planning/metadata_reader.d.ts +0 -6
- package/es/common/inversify-lite/planning/metadata_reader.js +0 -18
- package/es/common/inversify-lite/planning/metadata_reader.js.map +0 -1
- package/es/common/inversify-lite/planning/plan.d.ts +0 -7
- package/es/common/inversify-lite/planning/plan.js +0 -8
- package/es/common/inversify-lite/planning/plan.js.map +0 -1
- package/es/common/inversify-lite/planning/planner.d.ts +0 -5
- package/es/common/inversify-lite/planning/planner.js +0 -120
- package/es/common/inversify-lite/planning/planner.js.map +0 -1
- package/es/common/inversify-lite/planning/queryable_string.d.ts +0 -9
- package/es/common/inversify-lite/planning/queryable_string.js +0 -17
- package/es/common/inversify-lite/planning/queryable_string.js.map +0 -1
- package/es/common/inversify-lite/planning/reflection_utils.d.ts +0 -5
- package/es/common/inversify-lite/planning/reflection_utils.js +0 -99
- package/es/common/inversify-lite/planning/reflection_utils.js.map +0 -1
- package/es/common/inversify-lite/planning/request.d.ts +0 -14
- package/es/common/inversify-lite/planning/request.js +0 -16
- package/es/common/inversify-lite/planning/request.js.map +0 -1
- package/es/common/inversify-lite/planning/target.d.ts +0 -23
- package/es/common/inversify-lite/planning/target.js +0 -58
- package/es/common/inversify-lite/planning/target.js.map +0 -1
- package/es/common/inversify-lite/resolution/instantiation.d.ts +0 -3
- package/es/common/inversify-lite/resolution/instantiation.js +0 -117
- package/es/common/inversify-lite/resolution/instantiation.js.map +0 -1
- package/es/common/inversify-lite/resolution/resolver.d.ts +0 -3
- package/es/common/inversify-lite/resolution/resolver.js +0 -55
- package/es/common/inversify-lite/resolution/resolver.js.map +0 -1
- package/es/common/inversify-lite/scope/scope.d.ts +0 -3
- package/es/common/inversify-lite/scope/scope.js +0 -50
- package/es/common/inversify-lite/scope/scope.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_in_syntax.d.ts +0 -9
- package/es/common/inversify-lite/syntax/binding_in_syntax.js +0 -21
- package/es/common/inversify-lite/syntax/binding_in_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.d.ts +0 -12
- package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -25
- package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_on_syntax.d.ts +0 -6
- package/es/common/inversify-lite/syntax/binding_on_syntax.js +0 -8
- package/es/common/inversify-lite/syntax/binding_on_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_to_syntax.d.ts +0 -18
- package/es/common/inversify-lite/syntax/binding_to_syntax.js +0 -63
- package/es/common/inversify-lite/syntax/binding_to_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_when_on_syntax.d.ts +0 -8
- package/es/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -13
- package/es/common/inversify-lite/syntax/binding_when_on_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/binding_when_syntax.d.ts +0 -7
- package/es/common/inversify-lite/syntax/binding_when_syntax.js +0 -15
- package/es/common/inversify-lite/syntax/binding_when_syntax.js.map +0 -1
- package/es/common/inversify-lite/syntax/constraint_helpers.d.ts +0 -3
- package/es/common/inversify-lite/syntax/constraint_helpers.js +0 -11
- package/es/common/inversify-lite/syntax/constraint_helpers.js.map +0 -1
- package/es/common/inversify-lite/utils/async.d.ts +0 -3
- package/es/common/inversify-lite/utils/async.js +0 -10
- package/es/common/inversify-lite/utils/async.js.map +0 -1
- package/es/common/inversify-lite/utils/binding_utils.d.ts +0 -4
- package/es/common/inversify-lite/utils/binding_utils.js +0 -65
- package/es/common/inversify-lite/utils/binding_utils.js.map +0 -1
- package/es/common/inversify-lite/utils/clonable.d.ts +0 -3
- package/es/common/inversify-lite/utils/clonable.js +0 -6
- package/es/common/inversify-lite/utils/clonable.js.map +0 -1
- package/es/common/inversify-lite/utils/exceptions.d.ts +0 -2
- package/es/common/inversify-lite/utils/exceptions.js +0 -8
- package/es/common/inversify-lite/utils/exceptions.js.map +0 -1
- package/es/common/inversify-lite/utils/factory_type.d.ts +0 -5
- package/es/common/inversify-lite/utils/factory_type.js +0 -7
- package/es/common/inversify-lite/utils/factory_type.js.map +0 -1
- package/es/common/inversify-lite/utils/id.d.ts +0 -2
- package/es/common/inversify-lite/utils/id.js +0 -8
- package/es/common/inversify-lite/utils/id.js.map +0 -1
- package/es/common/inversify-lite/utils/js.d.ts +0 -1
- package/es/common/inversify-lite/utils/js.js +0 -8
- package/es/common/inversify-lite/utils/js.js.map +0 -1
- package/es/common/inversify-lite/utils/serialization.d.ts +0 -10
- package/es/common/inversify-lite/utils/serialization.js +0 -66
- package/es/common/inversify-lite/utils/serialization.js.map +0 -1
- package/es/container.d.ts +0 -2
- package/es/container.js +0 -4
- package/es/container.js.map +0 -1
- package/es/core/contributions/env/modules.d.ts +0 -3
- package/es/core/contributions/env/modules.js +0 -10
- package/es/core/contributions/env/modules.js.map +0 -1
- package/es/core/contributions/layerHandler/modules.d.ts +0 -3
- package/es/core/contributions/layerHandler/modules.js +0 -10
- package/es/core/contributions/layerHandler/modules.js.map +0 -1
- package/es/core/contributions/textMeasure/modules.d.ts +0 -3
- package/es/core/contributions/textMeasure/modules.js +0 -11
- package/es/core/contributions/textMeasure/modules.js.map +0 -1
- package/es/core/core-modules.d.ts +0 -3
- package/es/core/core-modules.js +0 -20
- package/es/core/core-modules.js.map +0 -1
- package/es/core/global-module.d.ts +0 -1
- package/es/core/global-module.js +0 -3
- package/es/core/global-module.js.map +0 -1
- package/es/graphic/graphic-service/graphic-module.d.ts +0 -3
- package/es/graphic/graphic-service/graphic-module.js +0 -12
- package/es/graphic/graphic-service/graphic-module.js.map +0 -1
- package/es/picker/pick-modules.d.ts +0 -3
- package/es/picker/pick-modules.js +0 -18
- package/es/picker/pick-modules.js.map +0 -1
- package/es/plugins/plugin-modules.d.ts +0 -3
- package/es/plugins/plugin-modules.js +0 -14
- package/es/plugins/plugin-modules.js.map +0 -1
- package/es/render/contributions/modules.d.ts +0 -2
- package/es/render/contributions/modules.js +0 -6
- package/es/render/contributions/modules.js.map +0 -1
- package/es/render/contributions/render/arc-module.d.ts +0 -2
- package/es/render/contributions/render/arc-module.js +0 -21
- package/es/render/contributions/render/arc-module.js.map +0 -1
- package/es/render/contributions/render/arc3d-module.d.ts +0 -2
- package/es/render/contributions/render/arc3d-module.js +0 -13
- package/es/render/contributions/render/arc3d-module.js.map +0 -1
- package/es/render/contributions/render/area-module.d.ts +0 -2
- package/es/render/contributions/render/area-module.js +0 -23
- package/es/render/contributions/render/area-module.js.map +0 -1
- package/es/render/contributions/render/circle-module.d.ts +0 -2
- package/es/render/contributions/render/circle-module.js +0 -21
- package/es/render/contributions/render/circle-module.js.map +0 -1
- package/es/render/contributions/render/glyph-module.d.ts +0 -2
- package/es/render/contributions/render/glyph-module.js +0 -13
- package/es/render/contributions/render/glyph-module.js.map +0 -1
- package/es/render/contributions/render/image-module.d.ts +0 -2
- package/es/render/contributions/render/image-module.js +0 -20
- package/es/render/contributions/render/image-module.js.map +0 -1
- package/es/render/contributions/render/line-module.d.ts +0 -2
- package/es/render/contributions/render/line-module.js +0 -16
- package/es/render/contributions/render/line-module.js.map +0 -1
- package/es/render/contributions/render/module.d.ts +0 -3
- package/es/render/contributions/render/module.js +0 -28
- package/es/render/contributions/render/module.js.map +0 -1
- package/es/render/contributions/render/path-module.d.ts +0 -2
- package/es/render/contributions/render/path-module.js +0 -21
- package/es/render/contributions/render/path-module.js.map +0 -1
- package/es/render/contributions/render/polygon-module.d.ts +0 -2
- package/es/render/contributions/render/polygon-module.js +0 -20
- package/es/render/contributions/render/polygon-module.js.map +0 -1
- package/es/render/contributions/render/pyramid3d-module.d.ts +0 -2
- package/es/render/contributions/render/pyramid3d-module.js +0 -13
- package/es/render/contributions/render/pyramid3d-module.js.map +0 -1
- package/es/render/contributions/render/rect-module.d.ts +0 -2
- package/es/render/contributions/render/rect-module.js +0 -23
- package/es/render/contributions/render/rect-module.js.map +0 -1
- package/es/render/contributions/render/rect3d-module.d.ts +0 -2
- package/es/render/contributions/render/rect3d-module.js +0 -13
- package/es/render/contributions/render/rect3d-module.js.map +0 -1
- package/es/render/contributions/render/richtext-module.d.ts +0 -2
- package/es/render/contributions/render/richtext-module.js +0 -13
- package/es/render/contributions/render/richtext-module.js.map +0 -1
- package/es/render/contributions/render/star-module.d.ts +0 -2
- package/es/render/contributions/render/star-module.js +0 -13
- package/es/render/contributions/render/star-module.js.map +0 -1
- package/es/render/contributions/render/symbol-module.d.ts +0 -2
- package/es/render/contributions/render/symbol-module.js +0 -21
- package/es/render/contributions/render/symbol-module.js.map +0 -1
- package/es/render/contributions/render/text-module.d.ts +0 -2
- package/es/render/contributions/render/text-module.js +0 -20
- package/es/render/contributions/render/text-module.js.map +0 -1
- package/es/render/render-modules.d.ts +0 -3
- package/es/render/render-modules.js +0 -10
- package/es/render/render-modules.js.map +0 -1
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
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);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
}, __metadata = this && this.__metadata || function(k, v) {
|
|
6
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
7
|
-
}, __param = this && this.__param || function(paramIndex, decorator) {
|
|
8
|
-
return function(target, key) {
|
|
9
|
-
decorator(target, key, paramIndex);
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
1
|
import { isArray } from "@visactor/vutils";
|
|
14
2
|
|
|
15
|
-
import { inject, injectable, named } from "../../../common/inversify-lite";
|
|
16
|
-
|
|
17
3
|
import { getTheme } from "../../../graphic/theme";
|
|
18
4
|
|
|
19
5
|
import { POLYGON_NUMBER_TYPE } from "../../../graphic/constants";
|
|
@@ -22,17 +8,18 @@ import { drawPolygon, drawRoundedPolygon } from "../../../common/polygon";
|
|
|
22
8
|
|
|
23
9
|
import { PolygonRenderContribution } from "./contributions/constants";
|
|
24
10
|
|
|
25
|
-
import { ContributionProvider } from "../../../common/contribution-provider";
|
|
26
|
-
|
|
27
11
|
import { BaseRender } from "./base-render";
|
|
28
12
|
|
|
29
13
|
import { defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution } from "./contributions/polygon-contribution-render";
|
|
30
14
|
|
|
31
|
-
|
|
15
|
+
import { contributionRegistry } from "../../../common/registry";
|
|
16
|
+
|
|
17
|
+
export class DefaultCanvasPolygonRender extends BaseRender {
|
|
32
18
|
constructor(graphicRenderContributions) {
|
|
33
|
-
super(), this.
|
|
34
|
-
|
|
35
|
-
this.
|
|
19
|
+
super(), this.numberType = POLYGON_NUMBER_TYPE, this.graphicRenderContributions = graphicRenderContributions || {
|
|
20
|
+
getContributions: () => contributionRegistry.get(PolygonRenderContribution)
|
|
21
|
+
}, this.builtinContributions = [ defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution ],
|
|
22
|
+
this.init(this.graphicRenderContributions);
|
|
36
23
|
}
|
|
37
24
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
38
25
|
const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon, {points: points = polygonAttribute.points, cornerRadius: cornerRadius = polygonAttribute.cornerRadius, x: originX = polygonAttribute.x, y: originY = polygonAttribute.y, closePath: closePath = polygonAttribute.closePath, fillStrokeOrder: fillStrokeOrder = polygonAttribute.fillStrokeOrder} = polygon.attribute, data = this.valid(polygon, polygonAttribute, fillCb, strokeCb);
|
|
@@ -54,9 +41,5 @@ let DefaultCanvasPolygonRender = class extends BaseRender {
|
|
|
54
41
|
const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon;
|
|
55
42
|
this._draw(polygon, polygonAttribute, !1, drawContext, params);
|
|
56
43
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
DefaultCanvasPolygonRender = __decorate([ injectable(), __param(0, inject(ContributionProvider)), __param(0, named(PolygonRenderContribution)), __metadata("design:paramtypes", [ Object ]) ], DefaultCanvasPolygonRender);
|
|
60
|
-
|
|
61
|
-
export { DefaultCanvasPolygonRender };
|
|
44
|
+
}
|
|
62
45
|
//# sourceMappingURL=polygon-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/render/contributions/render/polygon-render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/render/contributions/render/polygon-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAcjE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,0CAA0C,EAC1C,uCAAuC,EACxC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,OAAO,0BAA2B,SAAQ,UAAoB;IAMlE,YAAY,0BAA8E;QACxF,KAAK,EAAE,CAAC;QALV,eAAU,GAAW,mBAAmB,CAAC;QAMvC,IAAI,CAAC,0BAA0B;YAC7B,0BAA0B;gBACzB;oBACC,gBAAgB,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAA6B,yBAAyB,CAAC;iBAClD,CAAC;QAC1D,IAAI,CAAC,oBAAoB,GAAG,CAAC,0CAA0C,EAAE,uCAAuC,CAAC,CAAC;QAClH,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC7C,CAAC;IAED,SA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,EAAE;YACpB,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;SACd;aAAM;YACL,UAAU,EAAE,CAAC;YACb,QAAQ,EAAE,CAAC;SACZ;QAED,IAAI,CAAC,eAAe,CAClB,OAAO,EACP,OAAO,EACP,CAAC,EACD,CAAC,EACD,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,MAAM,EACN,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,OAAiB,EAAE,aAA6B,EAAE,WAAyB,EAAE,MAAiC;QACjH,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,CAAC,OAAO,CAAC;QAClE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IACpE,CAAC;CACF","file":"polygon-render.js","sourcesContent":["import { isArray } from '@visactor/vutils';\nimport { getTheme } from '../../../graphic/theme';\nimport { POLYGON_NUMBER_TYPE } from '../../../graphic/constants';\nimport type {\n IGraphicAttribute,\n IContext2d,\n IMarkAttribute,\n IPolygon,\n IThemeAttribute,\n IGraphicRender,\n IPolygonRenderContribution,\n IContributionProvider,\n IDrawContext,\n IGraphicRenderDrawParams,\n IRenderService\n} from '../../../interface';\nimport { drawPolygon, drawRoundedPolygon } from '../../../common/polygon';\nimport { PolygonRenderContribution } from './contributions/constants';\nimport { BaseRender } from './base-render';\nimport {\n defaultPolygonBackgroundRenderContribution,\n defaultPolygonTextureRenderContribution\n} from './contributions/polygon-contribution-render';\nimport { contributionRegistry } from '../../../common/registry';\n\nexport class DefaultCanvasPolygonRender extends BaseRender<IPolygon> implements IGraphicRender {\n type: 'polygon';\n numberType: number = POLYGON_NUMBER_TYPE;\n\n protected readonly graphicRenderContributions: IContributionProvider<IPolygonRenderContribution>;\n\n constructor(graphicRenderContributions?: IContributionProvider<IPolygonRenderContribution>) {\n super();\n this.graphicRenderContributions =\n graphicRenderContributions ||\n ({\n getContributions: () => contributionRegistry.get<IPolygonRenderContribution>(PolygonRenderContribution)\n } as IContributionProvider<IPolygonRenderContribution>);\n this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution];\n this.init(this.graphicRenderContributions);\n }\n\n drawShape(\n polygon: IPolygon,\n context: IContext2d,\n x: number,\n y: number,\n drawContext: IDrawContext,\n params?: IGraphicRenderDrawParams,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // const polygonAttribute = graphicService.themeService.getCurrentTheme().polygonAttribute;\n const polygonAttribute = getTheme(polygon, params?.theme).polygon;\n const {\n points = polygonAttribute.points,\n cornerRadius = polygonAttribute.cornerRadius,\n x: originX = polygonAttribute.x,\n y: originY = polygonAttribute.y,\n closePath = polygonAttribute.closePath,\n fillStrokeOrder = polygonAttribute.fillStrokeOrder\n } = polygon.attribute;\n\n const data = this.valid(polygon, polygonAttribute, fillCb, strokeCb);\n if (!data) {\n return;\n }\n const { fVisible, sVisible, doFill, doStroke } = data;\n\n context.beginPath();\n\n if ((cornerRadius as number) <= 0 || (isArray(cornerRadius) && (<number[]>cornerRadius).every(num => num === 0))) {\n drawPolygon(context.camera ? context : context.nativeContext, points, x, y);\n } else {\n // FIXME: type\n drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius, closePath);\n }\n // polygon 默认闭合\n closePath && context.closePath();\n\n // shadow\n context.setShadowBlendStyle && context.setShadowBlendStyle(polygon, polygon.attribute, polygonAttribute);\n\n this.beforeRenderStep(\n polygon,\n context,\n x,\n y,\n doFill,\n doStroke,\n fVisible,\n sVisible,\n polygonAttribute,\n drawContext,\n fillCb,\n strokeCb\n );\n\n const _runFill = () => {\n if (doFill) {\n if (fillCb) {\n fillCb(context, polygon.attribute, polygonAttribute);\n } else if (fVisible) {\n // 存在fill\n context.setCommonStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute);\n context.fill();\n }\n }\n };\n const _runStroke = () => {\n if (doStroke) {\n if (strokeCb) {\n strokeCb(context, polygon.attribute, polygonAttribute);\n } else if (sVisible) {\n // 存在stroke\n context.setStrokeStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute);\n context.stroke();\n }\n }\n };\n\n if (!fillStrokeOrder) {\n _runFill();\n _runStroke();\n } else {\n _runStroke();\n _runFill();\n }\n\n this.afterRenderStep(\n polygon,\n context,\n x,\n y,\n doFill,\n doStroke,\n fVisible,\n sVisible,\n polygonAttribute,\n drawContext,\n fillCb,\n strokeCb\n );\n }\n\n draw(polygon: IPolygon, renderService: IRenderService, drawContext: IDrawContext, params?: IGraphicRenderDrawParams) {\n const polygonAttribute = getTheme(polygon, params?.theme).polygon;\n this._draw(polygon, polygonAttribute, false, drawContext, params);\n }\n}\n"]}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
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);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
import { injectable } from "../../../common/inversify-lite";
|
|
8
|
-
|
|
9
1
|
import { getTheme } from "../../../graphic/theme";
|
|
10
2
|
|
|
11
3
|
import { PYRAMID3D_NUMBER_TYPE } from "../../../graphic/constants";
|
|
12
4
|
|
|
13
5
|
import { Base3dRender } from "./base-3d-render";
|
|
14
6
|
|
|
15
|
-
|
|
7
|
+
export class DefaultCanvasPyramid3dRender extends Base3dRender {
|
|
16
8
|
constructor() {
|
|
17
9
|
super(...arguments), this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE;
|
|
18
10
|
}
|
|
@@ -33,9 +25,5 @@ let DefaultCanvasPyramid3dRender = class extends Base3dRender {
|
|
|
33
25
|
const pyramid3dAttribute = getTheme(pyramid3d).polygon;
|
|
34
26
|
this._draw(pyramid3d, pyramid3dAttribute, !1, drawContext);
|
|
35
27
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
DefaultCanvasPyramid3dRender = __decorate([ injectable() ], DefaultCanvasPyramid3dRender);
|
|
39
|
-
|
|
40
|
-
export { DefaultCanvasPyramid3dRender };
|
|
28
|
+
}
|
|
41
29
|
//# sourceMappingURL=pyramid3d-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/render/contributions/render/pyramid3d-render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/render/contributions/render/pyramid3d-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAYnE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,OAAO,4BAA6B,SAAQ,YAAwB;IAA1E;;QACE,SAAI,GAAG,WAAW,CAAC;QACnB,eAAU,GAAW,qBAAqB,CAAC;IA2D7C,CAAC;IAxDC,SAAS,CACP,SAAqB,EACrB,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,WAAyB,EACzB,MAAiC,EACjC,MAIY,EACZ,QAIY;;QAGZ,MAAM,gBAAgB,GAAG,QAAQ,CAAC,SAAS,EAAE,MAAM,aAAN,MAAM,uB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CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;SACvC;IACH,CAAC;IAED,IAAI,CAAC,SAAqB,EAAE,aAA6B,EAAE,WAAyB;QAClF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC;QACvD,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,kBAAkB,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAChE,CAAC;CACF","file":"pyramid3d-render.js","sourcesContent":["import { getTheme } from '../../../graphic/theme';\nimport { PYRAMID3D_NUMBER_TYPE } from '../../../graphic/constants';\nimport type {\n IGraphicAttribute,\n IContext2d,\n IMarkAttribute,\n IPyramid3d,\n IThemeAttribute,\n IGraphicRender,\n IDrawContext,\n IGraphicRenderDrawParams,\n IRenderService\n} from '../../../interface';\nimport { Base3dRender } from './base-3d-render';\n\nexport class DefaultCanvasPyramid3dRender extends Base3dRender<IPyramid3d> implements IGraphicRender {\n type = 'pyramid3d';\n numberType: number = PYRAMID3D_NUMBER_TYPE;\n declare z: number;\n\n drawShape(\n pyramid3d: IPyramid3d,\n context: IContext2d,\n x: number,\n y: number,\n drawContext: IDrawContext,\n params?: IGraphicRenderDrawParams,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // const rectAttribute = graphicService.themeService.getCurrentTheme().rectAttribute;\n const pyramidAttribute = getTheme(pyramid3d, params?.theme).polygon;\n const {\n fill = pyramidAttribute.fill,\n stroke = pyramidAttribute.stroke,\n face = [true, true, true, true, true, true]\n } = pyramid3d.attribute;\n\n const z = this.z ?? 0;\n\n const data = this.valid(pyramid3d, pyramidAttribute, fillCb, strokeCb);\n if (!data) {\n return;\n }\n // const { fVisible, sVisible, doFill, doStroke } = data;\n\n const { light } = drawContext.stage || {};\n\n const face3d = pyramid3d.findFace();\n\n if (fill !== false) {\n context.setCommonStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute);\n let fc = fill;\n if (typeof fc !== 'string') {\n fc = 'black';\n }\n this.fill(x, y, z, face3d, face, fc, context, light, pyramid3d, pyramidAttribute, fillCb);\n }\n if (stroke !== false) {\n context.setStrokeStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute);\n this.stroke(x, y, z, face3d, context);\n }\n }\n\n draw(pyramid3d: IPyramid3d, renderService: IRenderService, drawContext: IDrawContext) {\n const pyramid3dAttribute = getTheme(pyramid3d).polygon;\n this._draw(pyramid3d, pyramid3dAttribute, false, drawContext);\n }\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { IGraphicAttribute, IContext2d, IMarkAttribute, IRect, IThemeAttribute, IGraphicRender, IDrawContext, IGraphicRenderDrawParams, IRenderService, IRectRenderContribution, IContributionProvider, IRectGraphicAttribute } from '../../../interface';
|
|
2
2
|
import { BaseRender } from './base-render';
|
|
3
3
|
export declare class DefaultCanvasRectRender extends BaseRender<IRect> implements IGraphicRender {
|
|
4
|
-
protected readonly graphicRenderContributions: IContributionProvider<IRectRenderContribution>;
|
|
5
4
|
type: string;
|
|
6
5
|
numberType: number;
|
|
7
6
|
tempTheme: Required<IRectGraphicAttribute>;
|
|
8
|
-
|
|
7
|
+
protected readonly graphicRenderContributions: IContributionProvider<IRectRenderContribution>;
|
|
8
|
+
constructor(graphicRenderContributions?: IContributionProvider<IRectRenderContribution>);
|
|
9
9
|
drawShape(rect: IRect, context: IContext2d, x: number, y: number, drawContext: IDrawContext, params?: IGraphicRenderDrawParams, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, rectAttribute?: Required<IRectGraphicAttribute>): void;
|
|
10
10
|
private _runFill;
|
|
11
11
|
private _runStroke;
|
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
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);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
}, __metadata = this && this.__metadata || function(k, v) {
|
|
6
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
7
|
-
}, __param = this && this.__param || function(paramIndex, decorator) {
|
|
8
|
-
return function(target, key) {
|
|
9
|
-
decorator(target, key, paramIndex);
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
1
|
import { isArray } from "@visactor/vutils";
|
|
14
2
|
|
|
15
|
-
import { inject, injectable, named } from "../../../common/inversify-lite";
|
|
16
|
-
|
|
17
3
|
import { getTheme } from "../../../graphic/theme";
|
|
18
4
|
|
|
19
5
|
import { RECT_NUMBER_TYPE } from "../../../graphic/constants";
|
|
20
6
|
|
|
21
7
|
import { createRectPath } from "../../../common/shape/rect";
|
|
22
8
|
|
|
23
|
-
import { ContributionProvider } from "../../../common/contribution-provider";
|
|
24
|
-
|
|
25
9
|
import { RectRenderContribution } from "./contributions/constants";
|
|
26
10
|
|
|
27
11
|
import { rectFillVisible, rectStrokeVisible, runFill, runStroke } from "./utils";
|
|
@@ -30,11 +14,14 @@ import { BaseRender } from "./base-render";
|
|
|
30
14
|
|
|
31
15
|
import { defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution } from "./contributions";
|
|
32
16
|
|
|
33
|
-
|
|
17
|
+
import { contributionRegistry } from "../../../common/registry";
|
|
18
|
+
|
|
19
|
+
export class DefaultCanvasRectRender extends BaseRender {
|
|
34
20
|
constructor(graphicRenderContributions) {
|
|
35
|
-
super(), this.
|
|
36
|
-
|
|
37
|
-
this.
|
|
21
|
+
super(), this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.graphicRenderContributions = graphicRenderContributions || {
|
|
22
|
+
getContributions: () => contributionRegistry.get(RectRenderContribution)
|
|
23
|
+
}, this.builtinContributions = [ defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution ],
|
|
24
|
+
this.init(this.graphicRenderContributions);
|
|
38
25
|
}
|
|
39
26
|
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb, rectAttribute) {
|
|
40
27
|
rectAttribute = null != rectAttribute ? rectAttribute : getTheme(rect, null == params ? void 0 : params.theme).rect;
|
|
@@ -70,9 +57,5 @@ let DefaultCanvasRectRender = class extends BaseRender {
|
|
|
70
57
|
const rectAttribute = getTheme(rect, null == params ? void 0 : params.theme).rect;
|
|
71
58
|
this._draw(rect, rectAttribute, !1, drawContext, params, rectAttribute);
|
|
72
59
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
DefaultCanvasRectRender = __decorate([ injectable(), __param(0, inject(ContributionProvider)), __param(0, named(RectRenderContribution)), __metadata("design:paramtypes", [ Object ]) ], DefaultCanvasRectRender);
|
|
76
|
-
|
|
77
|
-
export { DefaultCanvasRectRender };
|
|
60
|
+
}
|
|
78
61
|
//# sourceMappingURL=rect-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/render/contributions/render/rect-render.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAA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AI,cAAc,CAAC,QAAQ,EAAE;YAC3B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;aAClD;iBAAM,IAAI,QAAQ,EAAE;gBAEnB,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;gBACtF,OAAO,CAAC,MAAM,EAAE,CAAC;aAClB;SACF;IACH,CAAC;IAED,IAAI,CAAC,IAAW,EAAE,aAA6B,EAAE,WAAyB,EAAE,MAAiC;QAC3G,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,CAAC,IAAI,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IAC7E,CAAC;CACF,CAAA;AA7NY,uBAAuB;IADnC,UAAU,EAAE;IAOR,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;IAC5B,WAAA,KAAK,CAAC,sBAAsB,CAAC,CAAA;;GAPrB,uBAAuB,CA6NnC;SA7NY,uBAAuB","file":"rect-render.js","sourcesContent":["import { isArray } from '@visactor/vutils';\nimport { inject, injectable, named } from '../../../common/inversify-lite';\nimport { getTheme } from '../../../graphic/theme';\nimport { RECT_NUMBER_TYPE } from '../../../graphic/constants';\nimport { createRectPath } from '../../../common/shape/rect';\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport { ContributionProvider } from '../../../common/contribution-provider';\nimport type {\n IGraphicAttribute,\n IContext2d,\n IMarkAttribute,\n IRect,\n IThemeAttribute,\n IGraphicRender,\n IDrawContext,\n IGraphicRenderDrawParams,\n IRenderService,\n IRectRenderContribution,\n IContributionProvider,\n IRectGraphicAttribute\n} from '../../../interface';\nimport { RectRenderContribution } from './contributions/constants';\nimport { rectFillVisible, rectStrokeVisible, runFill, runStroke } from './utils';\nimport { BaseRender } from './base-render';\nimport {\n defaultRectBackgroundRenderContribution,\n defaultRectRenderContribution,\n defaultRectTextureRenderContribution\n} from './contributions';\n\n@injectable()\nexport class DefaultCanvasRectRender extends BaseRender<IRect> implements IGraphicRender {\n type = 'rect';\n numberType: number = RECT_NUMBER_TYPE;\n tempTheme: Required<IRectGraphicAttribute>;\n\n constructor(\n @inject(ContributionProvider)\n @named(RectRenderContribution)\n protected readonly graphicRenderContributions: IContributionProvider<IRectRenderContribution>\n ) {\n super();\n this.builtinContributions = [\n defaultRectRenderContribution,\n defaultRectBackgroundRenderContribution,\n defaultRectTextureRenderContribution\n ];\n this.init(graphicRenderContributions);\n }\n\n drawShape(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n drawContext: IDrawContext,\n params?: IGraphicRenderDrawParams,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n rectAttribute?: Required<IRectGraphicAttribute>\n ) {\n rectAttribute = rectAttribute ?? getTheme(rect, params?.theme).rect;\n const {\n fill = rectAttribute.fill,\n background,\n stroke = rectAttribute.stroke,\n cornerRadius = rectAttribute.cornerRadius,\n cornerType = rectAttribute.cornerType,\n opacity = rectAttribute.opacity,\n fillOpacity = rectAttribute.fillOpacity,\n lineWidth = rectAttribute.lineWidth,\n strokeOpacity = rectAttribute.strokeOpacity,\n visible = rectAttribute.visible,\n x1,\n y1,\n x: originX = rectAttribute.x,\n y: originY = rectAttribute.y,\n fillStrokeOrder = rectAttribute.fillStrokeOrder,\n drawStrokeWhenZeroWH = rectAttribute.drawStrokeWhenZeroWH\n } = rect.attribute;\n let { width, height } = rect.attribute;\n width = (width ?? x1 - originX) || 0;\n height = (height ?? y1 - originY) || 0;\n\n // 不绘制或者透明\n const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);\n const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH);\n const doFill = runFill(fill, background);\n const doStroke = runStroke(stroke, lineWidth);\n\n if (!(rect.valid && visible)) {\n return;\n }\n\n if (!(doFill || doStroke)) {\n return;\n }\n\n // 如果存在fillCb和strokeCb,那就不直接跳过\n if (!(fVisible || sVisible || fillCb || strokeCb || background)) {\n return;\n }\n\n if (cornerRadius === 0 || (isArray(cornerRadius) && (<number[]>cornerRadius).every(num => num === 0))) {\n // 不需要处理圆角\n context.beginPath();\n context.rect(x, y, width, height);\n } else {\n context.beginPath();\n\n // 测试后,cache对于重绘性能提升不大,但是在首屏有一定性能损耗,因此rect不再使用cache\n createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');\n }\n\n const doFillOrStroke = {\n doFill,\n doStroke\n };\n\n // shadow\n context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute);\n\n this.beforeRenderStep(\n rect,\n context,\n x,\n y,\n doFill,\n doStroke,\n fVisible,\n sVisible,\n rectAttribute,\n drawContext,\n fillCb,\n strokeCb,\n doFillOrStroke\n );\n\n // 内联的函数性能差\n // const _runFill = () => {\n // if (doFillOrStroke.doFill) {\n // if (fillCb) {\n // fillCb(context, rect.attribute, rectAttribute);\n // } else if (fVisible) {\n // // 存在fill\n // context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);\n // context.fill();\n // }\n // }\n // };\n // const _runStroke = () => {\n // if (doFillOrStroke.doStroke) {\n // if (strokeCb) {\n // strokeCb(context, rect.attribute, rectAttribute);\n // } else if (sVisible) {\n // // 存在stroke\n // context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);\n // context.stroke();\n // }\n // }\n // };\n\n if (!fillStrokeOrder) {\n this._runFill(rect, context, x, y, rectAttribute, doFillOrStroke, fVisible, originX, originY, fillCb);\n this._runStroke(rect, context, x, y, rectAttribute, doFillOrStroke, sVisible, originX, originY, strokeCb);\n } else {\n this._runStroke(rect, context, x, y, rectAttribute, doFillOrStroke, sVisible, originX, originY, strokeCb);\n this._runFill(rect, context, x, y, rectAttribute, doFillOrStroke, fVisible, originX, originY, fillCb);\n }\n\n this.afterRenderStep(\n rect,\n context,\n x,\n y,\n doFill,\n doStroke,\n fVisible,\n sVisible,\n rectAttribute,\n drawContext,\n fillCb,\n strokeCb\n );\n }\n\n private _runFill(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n rectAttribute: Required<IRectGraphicAttribute>,\n doFillOrStroke: { doFill: boolean; doStroke: boolean },\n fVisible: boolean,\n originX: number,\n originY: number,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n if (doFillOrStroke.doFill) {\n if (fillCb) {\n fillCb(context, rect.attribute, rectAttribute);\n } else if (fVisible) {\n // 存在fill\n context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);\n context.fill();\n }\n }\n }\n\n private _runStroke(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n rectAttribute: Required<IRectGraphicAttribute>,\n doFillOrStroke: { doFill: boolean; doStroke: boolean },\n sVisible: boolean,\n originX: number,\n originY: number,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n if (doFillOrStroke.doStroke) {\n if (strokeCb) {\n strokeCb(context, rect.attribute, rectAttribute);\n } else if (sVisible) {\n // 存在stroke\n context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);\n context.stroke();\n }\n }\n }\n\n draw(rect: IRect, renderService: IRenderService, drawContext: IDrawContext, params?: IGraphicRenderDrawParams) {\n const rectAttribute = getTheme(rect, params?.theme).rect;\n this._draw(rect, rectAttribute, false, drawContext, params, rectAttribute);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/render/contributions/render/rect-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAe5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,uCAAuC,EACvC,6BAA6B,EAC7B,oCAAoC,EACrC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,OAAO,uBAAwB,SAAQ,UAAiB;IAO5D,YAAY,0BAA2E;QACrF,KAAK,EAAE,CAAC;QAPV,SAAI,GAAG,MAAM,CAAC;QACd,eAAU,GAAW,gBAAgB,CAAC;QAOpC,IAAI,CAAC,0BAA0B;YAC7B,0BAA0B;gBACzB;oBACC,gBAAgB,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAA0B,sBAAsB,CAAC;iBAC/C,CAAC;QACvD,IAAI,CAAC,oBAAoB,GAAG;YAC1B,6BAA6B;YAC7B,uCAAuC;YACvC,oCAAoC;SACrC,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC7C,CAAC;IAED,SAAS,CACP,IAAW,EACX,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,WAAyB,EACzB,MAAiC,EACjC,MAIY,EACZ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O,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;gBACtF,OAAO,CAAC,IAAI,EAAE,CAAC;aAChB;SACF;IACH,CAAC;IAEO,UAAU,CAChB,IAAW,EACX,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,aAA8C,EAC9C,cAAsD,EACtD,QAAiB,EACjB,OAAe,EACf,OAAe,EACf,QAIY;QAEZ,IAAI,cAAc,CAAC,QAAQ,EAAE;YAC3B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;aAClD;iBAAM,IAAI,QAAQ,EAAE;gBAEnB,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;gBACtF,OAAO,CAAC,MAAM,EAAE,CAAC;aAClB;SACF;IACH,CAAC;IAED,IAAI,CAAC,IAAW,EAAE,aAA6B,EAAE,WAAyB,EAAE,MAAiC;QAC3G,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,CAAC,IAAI,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IAC7E,CAAC;CACF","file":"rect-render.js","sourcesContent":["import { isArray } from '@visactor/vutils';\nimport { getTheme } from '../../../graphic/theme';\nimport { RECT_NUMBER_TYPE } from '../../../graphic/constants';\nimport { createRectPath } from '../../../common/shape/rect';\nimport type {\n IGraphicAttribute,\n IContext2d,\n IMarkAttribute,\n IRect,\n IThemeAttribute,\n IGraphicRender,\n IDrawContext,\n IGraphicRenderDrawParams,\n IRenderService,\n IRectRenderContribution,\n IContributionProvider,\n IRectGraphicAttribute\n} from '../../../interface';\nimport { RectRenderContribution } from './contributions/constants';\nimport { rectFillVisible, rectStrokeVisible, runFill, runStroke } from './utils';\nimport { BaseRender } from './base-render';\nimport {\n defaultRectBackgroundRenderContribution,\n defaultRectRenderContribution,\n defaultRectTextureRenderContribution\n} from './contributions';\nimport { contributionRegistry } from '../../../common/registry';\n\nexport class DefaultCanvasRectRender extends BaseRender<IRect> implements IGraphicRender {\n type = 'rect';\n numberType: number = RECT_NUMBER_TYPE;\n tempTheme: Required<IRectGraphicAttribute>;\n\n protected readonly graphicRenderContributions: IContributionProvider<IRectRenderContribution>;\n\n constructor(graphicRenderContributions?: IContributionProvider<IRectRenderContribution>) {\n super();\n this.graphicRenderContributions =\n graphicRenderContributions ||\n ({\n getContributions: () => contributionRegistry.get<IRectRenderContribution>(RectRenderContribution)\n } as IContributionProvider<IRectRenderContribution>);\n this.builtinContributions = [\n defaultRectRenderContribution,\n defaultRectBackgroundRenderContribution,\n defaultRectTextureRenderContribution\n ];\n this.init(this.graphicRenderContributions);\n }\n\n drawShape(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n drawContext: IDrawContext,\n params?: IGraphicRenderDrawParams,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n rectAttribute?: Required<IRectGraphicAttribute>\n ) {\n rectAttribute = rectAttribute ?? getTheme(rect, params?.theme).rect;\n const {\n fill = rectAttribute.fill,\n background,\n stroke = rectAttribute.stroke,\n cornerRadius = rectAttribute.cornerRadius,\n cornerType = rectAttribute.cornerType,\n opacity = rectAttribute.opacity,\n fillOpacity = rectAttribute.fillOpacity,\n lineWidth = rectAttribute.lineWidth,\n strokeOpacity = rectAttribute.strokeOpacity,\n visible = rectAttribute.visible,\n x1,\n y1,\n x: originX = rectAttribute.x,\n y: originY = rectAttribute.y,\n fillStrokeOrder = rectAttribute.fillStrokeOrder,\n drawStrokeWhenZeroWH = rectAttribute.drawStrokeWhenZeroWH\n } = rect.attribute;\n let { width, height } = rect.attribute;\n width = (width ?? x1 - originX) || 0;\n height = (height ?? y1 - originY) || 0;\n\n // 不绘制或者透明\n const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);\n const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH);\n const doFill = runFill(fill, background);\n const doStroke = runStroke(stroke, lineWidth);\n\n if (!(rect.valid && visible)) {\n return;\n }\n\n if (!(doFill || doStroke)) {\n return;\n }\n\n // 如果存在fillCb和strokeCb,那就不直接跳过\n if (!(fVisible || sVisible || fillCb || strokeCb || background)) {\n return;\n }\n\n if (cornerRadius === 0 || (isArray(cornerRadius) && (<number[]>cornerRadius).every(num => num === 0))) {\n // 不需要处理圆角\n context.beginPath();\n context.rect(x, y, width, height);\n } else {\n context.beginPath();\n\n // 测试后,cache对于重绘性能提升不大,但是在首屏有一定性能损耗,因此rect不再使用cache\n createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');\n }\n\n const doFillOrStroke = {\n doFill,\n doStroke\n };\n\n // shadow\n context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute);\n\n this.beforeRenderStep(\n rect,\n context,\n x,\n y,\n doFill,\n doStroke,\n fVisible,\n sVisible,\n rectAttribute,\n drawContext,\n fillCb,\n strokeCb,\n doFillOrStroke\n );\n\n // 内联的函数性能差\n // const _runFill = () => {\n // if (doFillOrStroke.doFill) {\n // if (fillCb) {\n // fillCb(context, rect.attribute, rectAttribute);\n // } else if (fVisible) {\n // // 存在fill\n // context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);\n // context.fill();\n // }\n // }\n // };\n // const _runStroke = () => {\n // if (doFillOrStroke.doStroke) {\n // if (strokeCb) {\n // strokeCb(context, rect.attribute, rectAttribute);\n // } else if (sVisible) {\n // // 存在stroke\n // context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);\n // context.stroke();\n // }\n // }\n // };\n\n if (!fillStrokeOrder) {\n this._runFill(rect, context, x, y, rectAttribute, doFillOrStroke, fVisible, originX, originY, fillCb);\n this._runStroke(rect, context, x, y, rectAttribute, doFillOrStroke, sVisible, originX, originY, strokeCb);\n } else {\n this._runStroke(rect, context, x, y, rectAttribute, doFillOrStroke, sVisible, originX, originY, strokeCb);\n this._runFill(rect, context, x, y, rectAttribute, doFillOrStroke, fVisible, originX, originY, fillCb);\n }\n\n this.afterRenderStep(\n rect,\n context,\n x,\n y,\n doFill,\n doStroke,\n fVisible,\n sVisible,\n rectAttribute,\n drawContext,\n fillCb,\n strokeCb\n );\n }\n\n private _runFill(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n rectAttribute: Required<IRectGraphicAttribute>,\n doFillOrStroke: { doFill: boolean; doStroke: boolean },\n fVisible: boolean,\n originX: number,\n originY: number,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n if (doFillOrStroke.doFill) {\n if (fillCb) {\n fillCb(context, rect.attribute, rectAttribute);\n } else if (fVisible) {\n // 存在fill\n context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);\n context.fill();\n }\n }\n }\n\n private _runStroke(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n rectAttribute: Required<IRectGraphicAttribute>,\n doFillOrStroke: { doFill: boolean; doStroke: boolean },\n sVisible: boolean,\n originX: number,\n originY: number,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n if (doFillOrStroke.doStroke) {\n if (strokeCb) {\n strokeCb(context, rect.attribute, rectAttribute);\n } else if (sVisible) {\n // 存在stroke\n context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);\n context.stroke();\n }\n }\n }\n\n draw(rect: IRect, renderService: IRenderService, drawContext: IDrawContext, params?: IGraphicRenderDrawParams) {\n const rectAttribute = getTheme(rect, params?.theme).rect;\n this._draw(rect, rectAttribute, false, drawContext, params, rectAttribute);\n }\n}\n"]}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
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);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
import { injectable } from "../../../common/inversify-lite";
|
|
8
|
-
|
|
9
1
|
import { getTheme } from "../../../graphic/theme";
|
|
10
2
|
|
|
11
3
|
import { rectFillVisible, rectStrokeVisible, runFill, runStroke } from "./utils";
|
|
@@ -14,7 +6,7 @@ import { RECT3D_NUMBER_TYPE } from "../../../graphic/constants";
|
|
|
14
6
|
|
|
15
7
|
import { Base3dRender } from "./base-3d-render";
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
export class DefaultCanvasRect3dRender extends Base3dRender {
|
|
18
10
|
constructor() {
|
|
19
11
|
super(...arguments), this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE;
|
|
20
12
|
}
|
|
@@ -40,9 +32,5 @@ let DefaultCanvasRect3dRender = class extends Base3dRender {
|
|
|
40
32
|
const rectAttribute = getTheme(rect).rect;
|
|
41
33
|
this._draw(rect, rectAttribute, !1, drawContext);
|
|
42
34
|
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
DefaultCanvasRect3dRender = __decorate([ injectable() ], DefaultCanvasRect3dRender);
|
|
46
|
-
|
|
47
|
-
export { DefaultCanvasRect3dRender };
|
|
35
|
+
}
|
|
48
36
|
//# sourceMappingURL=rect3d-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/render/contributions/render/rect3d-render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/render/contributions/render/rect3d-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAalD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,OAAO,yBAA0B,SAAQ,YAAqB;IAApE;;QACE,SAAI,GAAG,QAAQ,CAAC;QAChB,eAAU,GAAW,kBAAkB,CAAC;IAoF1C,CAAC;IAjFC,SAAS,CACP,IAAa,EACb,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,WAAyB,EACzB,MAAiC,EACjC,MAIY,EACZ,QAIY;;QAGZ,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,CAAC,IAAI,CAAC;QACzD,MAAM,EACJ,IAAI,GAAG,aAAa,CAAC,IAAI,EACzB,MAAM,GAAG,aAAa,CAAC,MAAM,EAC7B,EAAE,EACF,EAAE,EACF,CAAC,EAAE,OAAO,EACV,CAAC,EAAE,OAAO,EACV,OAAO,GAAG,aAAa,CAAC,OAAO,EAC/B,WAAW,GAAG,aAAa,CAAC,WAAW,EACvC,SAAS,GAAG,aAAa,CAAC,SAAS,EACnC,aAAa,GAAG,aAAa,CAAC,aAAa,EAC3C,OAAO,GAAG,aAAa,CAAC,OAAO,EAC/B,oBAAoB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I,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC;YAClE,IAAI,EAAE,GAAG,IAAI,CAAC;YACd,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;gBAC1B,EAAE,GAAG,OAAO,CAAC;aACd;YACD,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAC1E;QACD,IAAI,MAAM,KAAK,KAAK,EAAE;YACpB,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC;YAClE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;SACvC;IACH,CAAC;IAED,IAAI,CAAC,IAAa,EAAE,aAA6B,EAAE,WAAyB;QAC1E,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;QAC1C,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IACtD,CAAC;CACF","file":"rect3d-render.js","sourcesContent":["import { getTheme } from '../../../graphic/theme';\nimport type {\n IGraphicAttribute,\n IContext2d,\n IFace3d,\n IMarkAttribute,\n IRect3d,\n IThemeAttribute,\n IGraphicRender,\n IDrawContext,\n IGraphicRenderDrawParams,\n IRenderService\n} from '../../../interface';\nimport { rectFillVisible, rectStrokeVisible, runFill, runStroke } from './utils';\nimport { RECT3D_NUMBER_TYPE } from '../../../graphic/constants';\nimport { Base3dRender } from './base-3d-render';\n\nexport class DefaultCanvasRect3dRender extends Base3dRender<IRect3d> implements IGraphicRender {\n type = 'rect3d';\n numberType: number = RECT3D_NUMBER_TYPE;\n declare z: number;\n\n drawShape(\n rect: IRect3d,\n context: IContext2d,\n x: number,\n y: number,\n drawContext: IDrawContext,\n params?: IGraphicRenderDrawParams,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // const rectAttribute = graphicService.themeService.getCurrentTheme().rectAttribute;\n const rectAttribute = getTheme(rect, params?.theme).rect;\n const {\n fill = rectAttribute.fill,\n stroke = rectAttribute.stroke,\n x1,\n y1,\n x: originX,\n y: originY,\n opacity = rectAttribute.opacity,\n fillOpacity = rectAttribute.fillOpacity,\n lineWidth = rectAttribute.lineWidth,\n strokeOpacity = rectAttribute.strokeOpacity,\n visible = rectAttribute.visible,\n drawStrokeWhenZeroWH = rectAttribute.drawStrokeWhenZeroWH ?? false\n } = rect.attribute;\n let { width, height } = rect.attribute;\n\n width = (width ?? x1 - originX) || 0;\n height = (height ?? y1 - originY) || 0;\n\n const z = this.z ?? 0;\n\n // 不绘制或者透明\n const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);\n const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH);\n const doFill = runFill(fill);\n const doStroke = runStroke(stroke, lineWidth);\n\n if (!(rect.valid && visible)) {\n return;\n }\n\n if (!(doFill || doStroke)) {\n return;\n }\n\n // 如果存在fillCb和strokeCb,那就不直接跳过\n if (!(fVisible || sVisible || fillCb || strokeCb)) {\n return;\n }\n\n const { light } = drawContext.stage || {};\n const face3d = rect.findFace();\n\n if (fill !== false) {\n context.setCommonStyle(rect, rect.attribute, x, y, rectAttribute);\n let fc = fill;\n if (typeof fc !== 'string') {\n fc = 'black';\n }\n this.fill(x, y, z, face3d, null, fc, context, light, null, null, fillCb);\n }\n if (stroke !== false) {\n context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute);\n this.stroke(x, y, z, face3d, context);\n }\n }\n\n draw(rect: IRect3d, renderService: IRenderService, drawContext: IDrawContext) {\n const rectAttribute = getTheme(rect).rect;\n this._draw(rect, rectAttribute, false, drawContext);\n }\n}\n"]}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
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);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
}, __metadata = this && this.__metadata || function(k, v) {
|
|
6
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
import { injectable } from "../../../common/inversify-lite";
|
|
10
|
-
|
|
11
1
|
import { createRectPath } from "../../../common/shape/rect";
|
|
12
2
|
|
|
13
3
|
import { getTheme } from "../../../graphic/theme";
|
|
@@ -20,7 +10,7 @@ import { BaseRender } from "./base-render";
|
|
|
20
10
|
|
|
21
11
|
import { defaultTextBackgroundRenderContribution } from "./contributions/text-contribution-render";
|
|
22
12
|
|
|
23
|
-
|
|
13
|
+
export class DefaultCanvasRichTextRender extends BaseRender {
|
|
24
14
|
constructor() {
|
|
25
15
|
super(), this.numberType = RICHTEXT_NUMBER_TYPE, this.builtinContributions = [ defaultTextBackgroundRenderContribution ],
|
|
26
16
|
this.init();
|
|
@@ -52,9 +42,5 @@ let DefaultCanvasRichTextRender = class extends BaseRender {
|
|
|
52
42
|
const richtextAttribute = getTheme(richtext).richtext;
|
|
53
43
|
this._draw(richtext, richtextAttribute, !1, drawContext);
|
|
54
44
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
DefaultCanvasRichTextRender = __decorate([ injectable(), __metadata("design:paramtypes", []) ], DefaultCanvasRichTextRender);
|
|
58
|
-
|
|
59
|
-
export { DefaultCanvasRichTextRender };
|
|
45
|
+
}
|
|
60
46
|
//# sourceMappingURL=richtext-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/render/contributions/render/richtext-render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/render/contributions/render/richtext-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AASlE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,uCAAuC,EAAE,MAAM,0CAA0C,CAAC;AAEnG,MAAM,OAAO,2BAA4B,SAAQ,UAAqB;IAIpE;QACE,KAAK,EAAE,CAAC;QAHV,eAAU,GAAW,oBAAoB,CAAC;QAIxC,IAAI,CAAC,oBAAoB,GAAG,CAAC,uCAA8C,CAAC,CAAC;QAC7E,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,SAAS,CAAC,QAAmB,EAAE,OAAmB,EAAE,CAAS,EAAE,CAAS,EAAE,WAAyB;QACjG,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;QACtD,MAAM,EACJ,aAAa,GAAG,iBAAiB,CAAC,aAAa,EAC/C,OAAO,GAAG,iBAAiB,CAAC,OAAO,EACnC,WAAW,GAAG,iBAAiB,CAAC,WAAW,EAC3C,OAAO,GAAG,iBAAiB,CAAC,OAAO,EACpC,GAAG,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C,IAAI,EAAE,CAAC;aAChB;YACD,IAAI,gBAAgB,EAAE;gBAEpB,OAAO,CAAC,WAAW,GAAG,uBAAuB,CAAC;gBAC9C,OAAO,CAAC,WAAW,GAAG,gBAA0B,CAAC;gBACjD,OAAO,CAAC,MAAM,EAAE,CAAC;aAClB;SACF;QAGD,MAAM,GAAG,GAAG,GAAG,KAAI,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,0CAAE,GAAG,CAAC,GAAG,CAAC,CAAA,CAAC;QAC7C,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE;YACnC,OAAO;SACR;QAED,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC;QAC9B,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,CAAC,QAAmB,EAAE,aAA6B,EAAE,WAAyB;QAChF,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;QACtD,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAC9D,CAAC;CACF","file":"richtext-render.js","sourcesContent":["import { createRectPath } from '../../../common/shape/rect';\nimport { getTheme } from '../../../graphic/theme';\nimport { RICHTEXT_NUMBER_TYPE } from '../../../graphic/constants';\nimport type {\n IContext2d,\n IRichText,\n IRichTextIcon,\n IDrawContext,\n IRenderService,\n IGraphicRender\n} from '../../../interface';\nimport { fillVisible } from './utils';\nimport { BaseRender } from './base-render';\nimport { defaultTextBackgroundRenderContribution } from './contributions/text-contribution-render';\n\nexport class DefaultCanvasRichTextRender extends BaseRender<IRichText> implements IGraphicRender {\n type: 'richtext';\n numberType: number = RICHTEXT_NUMBER_TYPE;\n\n constructor() {\n super();\n this.builtinContributions = [defaultTextBackgroundRenderContribution as any];\n this.init();\n }\n\n drawShape(richtext: IRichText, context: IContext2d, x: number, y: number, drawContext: IDrawContext) {\n const richtextAttribute = getTheme(richtext).richtext;\n const {\n strokeOpacity = richtextAttribute.strokeOpacity,\n opacity = richtextAttribute.opacity,\n fillOpacity = richtextAttribute.fillOpacity,\n visible = richtextAttribute.visible\n } = richtext.attribute;\n\n if (!(richtext.valid && visible)) {\n return;\n }\n\n const fVisible = fillVisible(opacity, fillOpacity, true);\n const sVisible = fillVisible(opacity, strokeOpacity, true);\n if (!fVisible) {\n return;\n }\n\n // shadow\n context.setShadowBlendStyle && context.setShadowBlendStyle(richtext, richtext.attribute, richtextAttribute);\n\n context.translate(x, y);\n this.beforeRenderStep(\n richtext,\n context,\n x,\n y,\n fVisible,\n sVisible,\n fVisible,\n sVisible,\n richtextAttribute,\n drawContext\n );\n const frame = richtext.getFrameCache();\n frame.draw(context, this.drawIcon);\n\n this.afterRenderStep(\n richtext,\n context,\n x,\n y,\n fVisible,\n sVisible,\n fVisible,\n sVisible,\n richtextAttribute,\n drawContext\n );\n }\n\n drawIcon(icon: IRichTextIcon, context: IContext2d, x: number, y: number, baseline: number) {\n const richtextIconAttribute = getTheme(icon).richtextIcon;\n\n const {\n width = richtextIconAttribute.width,\n height = richtextIconAttribute.height,\n opacity = richtextIconAttribute.opacity,\n image: url,\n backgroundFill = richtextIconAttribute.backgroundFill,\n // backgroundFillColor = richtextIconAttribute.backgroundFillColor,\n backgroundFillOpacity = richtextIconAttribute.backgroundFillOpacity,\n backgroundStroke = richtextIconAttribute.backgroundStroke,\n // backgroundStrokeColor = richtextIconAttribute.backgroundStrokeColor,\n backgroundStrokeOpacity = richtextIconAttribute.backgroundStrokeOpacity,\n backgroundRadius = richtextIconAttribute.backgroundRadius,\n margin\n } = icon.attribute;\n\n const { backgroundWidth = width, backgroundHeight = height } = icon.attribute;\n\n if (margin) {\n x += icon._marginArray[3];\n y += icon._marginArray[0];\n }\n\n // y -= height / 2 - baseline;\n\n // 绘制background\n if (icon._hovered) {\n const expandX = (backgroundWidth - width) / 2;\n const expandY = (backgroundHeight - height) / 2;\n\n if (backgroundRadius === 0) {\n // 不需要处理圆角\n context.beginPath();\n context.rect(x - expandX, y - expandY, backgroundWidth, backgroundHeight);\n } else {\n context.beginPath();\n createRectPath(context, x - expandX, y - expandY, backgroundWidth, backgroundHeight, backgroundRadius, true);\n }\n if (backgroundFill) {\n // context.setCommonStyle(rect, rect.attribute, x, y, rectAttribute);\n context.globalAlpha = backgroundFillOpacity;\n context.fillStyle = backgroundFill as string;\n context.fill();\n }\n if (backgroundStroke) {\n // context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute);\n context.globalAlpha = backgroundStrokeOpacity;\n context.strokeStyle = backgroundStroke as string;\n context.stroke();\n }\n }\n\n // 绘制图标\n const res = url && icon?.resources?.get(url);\n if (!res || res.state !== 'success') {\n return;\n }\n // context.setCommonStyle(icon, icon.attribute, x, y, iconAttribute);\n context.globalAlpha = opacity;\n context.drawImage(res.data, x, y, width, height);\n }\n\n draw(richtext: IRichText, renderService: IRenderService, drawContext: IDrawContext) {\n const richtextAttribute = getTheme(richtext).richtext;\n this._draw(richtext, richtextAttribute, false, drawContext);\n }\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { IGraphicAttribute, IContext2d, IMarkAttribute, IStar, IThemeAttribute, IGraphicRender, IContributionProvider, IDrawContext, IGraphicRenderDrawParams, IRenderService, IStarRenderContribution } from '../../../interface';
|
|
2
2
|
import { BaseRender } from './base-render';
|
|
3
3
|
export declare class DefaultCanvasStarRender extends BaseRender<IStar> implements IGraphicRender {
|
|
4
|
-
protected readonly starRenderContribitions: IContributionProvider<IStarRenderContribution>;
|
|
5
4
|
type: 'star';
|
|
6
5
|
numberType: number;
|
|
7
|
-
|
|
6
|
+
protected readonly starRenderContribitions: IContributionProvider<IStarRenderContribution>;
|
|
7
|
+
constructor(starRenderContribitions?: IContributionProvider<IStarRenderContribution>);
|
|
8
8
|
drawShape(star: IStar, context: IContext2d, x: number, y: number, drawContext: IDrawContext, params?: IGraphicRenderDrawParams, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean): void;
|
|
9
9
|
draw(star: IStar, renderService: IRenderService, drawContext: IDrawContext, params?: IGraphicRenderDrawParams): void;
|
|
10
10
|
}
|
|
@@ -1,34 +1,21 @@
|
|
|
1
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
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);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
}, __metadata = this && this.__metadata || function(k, v) {
|
|
6
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
7
|
-
}, __param = this && this.__param || function(paramIndex, decorator) {
|
|
8
|
-
return function(target, key) {
|
|
9
|
-
decorator(target, key, paramIndex);
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
import { inject, injectable, named } from "../../../common/inversify-lite";
|
|
14
|
-
|
|
15
1
|
import { getTheme } from "../../../graphic/theme";
|
|
16
2
|
|
|
17
3
|
import { STAR_NUMBER_TYPE } from "../../../graphic/constants";
|
|
18
4
|
|
|
19
5
|
import { StarRenderContribution } from "./contributions/constants";
|
|
20
6
|
|
|
21
|
-
import { ContributionProvider } from "../../../common/contribution-provider";
|
|
22
|
-
|
|
23
7
|
import { BaseRender } from "./base-render";
|
|
24
8
|
|
|
25
9
|
import { defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution } from "./contributions";
|
|
26
10
|
|
|
27
|
-
|
|
11
|
+
import { contributionRegistry } from "../../../common/registry";
|
|
12
|
+
|
|
13
|
+
export class DefaultCanvasStarRender extends BaseRender {
|
|
28
14
|
constructor(starRenderContribitions) {
|
|
29
|
-
super(), this.
|
|
30
|
-
|
|
31
|
-
this.
|
|
15
|
+
super(), this.numberType = STAR_NUMBER_TYPE, this.starRenderContribitions = starRenderContribitions || {
|
|
16
|
+
getContributions: () => contributionRegistry.get(StarRenderContribution)
|
|
17
|
+
}, this.builtinContributions = [ defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution ],
|
|
18
|
+
this.init(this.starRenderContribitions);
|
|
32
19
|
}
|
|
33
20
|
drawShape(star, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
34
21
|
const starAttribute = getTheme(star, null == params ? void 0 : params.theme).star, {x: originX = starAttribute.x, y: originY = starAttribute.y, fillStrokeOrder: fillStrokeOrder = starAttribute.fillStrokeOrder} = star.attribute, data = this.valid(star, starAttribute, fillCb, strokeCb);
|
|
@@ -51,9 +38,5 @@ let DefaultCanvasStarRender = class extends BaseRender {
|
|
|
51
38
|
const starAttribute = getTheme(star, null == params ? void 0 : params.theme).star;
|
|
52
39
|
this._draw(star, starAttribute, !1, drawContext, params);
|
|
53
40
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
DefaultCanvasStarRender = __decorate([ injectable(), __param(0, inject(ContributionProvider)), __param(0, named(StarRenderContribution)), __metadata("design:paramtypes", [ Object ]) ], DefaultCanvasStarRender);
|
|
57
|
-
|
|
58
|
-
export { DefaultCanvasStarRender };
|
|
41
|
+
}
|
|
59
42
|
//# sourceMappingURL=star-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/render/contributions/render/star-render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/render/contributions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visactor/vutils';\nimport { getTheme } from '../../../graphic/theme';\nimport { STAR_NUMBER_TYPE } from '../../../graphic/constants';\nimport type {\n IGraphicAttribute,\n IContext2d,\n IMarkAttribute,\n IStar,\n IThemeAttribute,\n IGraphicRender,\n IContributionProvider,\n IDrawContext,\n IGraphicRenderDrawParams,\n IRenderService,\n IStarRenderContribution\n} from '../../../interface';\nimport { StarRenderContribution } from './contributions/constants';\nimport { BaseRender } from './base-render';\nimport { defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution } from './contributions';\nimport { contributionRegistry } from '../../../common/registry';\n\nexport class DefaultCanvasStarRender extends BaseRender<IStar> implements IGraphicRender {\n type: 'star';\n numberType: number = STAR_NUMBER_TYPE;\n\n protected readonly starRenderContribitions: IContributionProvider<IStarRenderContribution>;\n\n constructor(starRenderContribitions?: IContributionProvider<IStarRenderContribution>) {\n super();\n this.starRenderContribitions =\n starRenderContribitions ||\n ({\n getContributions: () => contributionRegistry.get<IStarRenderContribution>(StarRenderContribution)\n } as IContributionProvider<IStarRenderContribution>);\n this.builtinContributions = [defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution];\n this.init(this.starRenderContribitions);\n }\n\n drawShape(\n star: IStar,\n context: IContext2d,\n x: number,\n y: number,\n drawContext: IDrawContext,\n params?: IGraphicRenderDrawParams,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // Get theme attributes\n const starAttribute = getTheme(star, params?.theme).star;\n const {\n x: originX = starAttribute.x,\n y: originY = starAttribute.y,\n fillStrokeOrder = starAttribute.fillStrokeOrder\n } = star.attribute;\n\n const data = this.valid(star, starAttribute, fillCb, strokeCb);\n if (!data) {\n return;\n }\n const { fVisible, sVisible, doFill, doStroke } = data;\n\n // Get cached points for better performance\n const points = star.getCachedPoints();\n\n context.beginPath();\n\n // Draw the star using cached points\n if (points && points.length) {\n points.forEach((point, index) => {\n if (index === 0) {\n context.moveTo(x + point.x, y + point.y);\n } else {\n context.lineTo(x + point.x, y + point.y);\n }\n });\n }\n\n // Close the path\n context.closePath();\n\n // Shadow\n context.setShadowBlendStyle && context.setShadowBlendStyle(star, star.attribute, starAttribute);\n\n this.beforeRenderStep(\n star,\n context,\n x,\n y,\n doFill,\n doStroke,\n fVisible,\n sVisible,\n starAttribute,\n drawContext,\n fillCb,\n strokeCb\n );\n\n const _runFill = () => {\n if (doFill) {\n if (fillCb) {\n fillCb(context, star.attribute, starAttribute);\n } else if (fVisible) {\n // Apply fill\n context.setCommonStyle(star, star.attribute, originX - x, originY - y, starAttribute);\n context.fill();\n }\n }\n };\n const _runStroke = () => {\n if (doStroke) {\n if (strokeCb) {\n strokeCb(context, star.attribute, starAttribute);\n } else if (sVisible) {\n // Apply stroke\n context.setStrokeStyle(star, star.attribute, originX - x, originY - y, starAttribute);\n context.stroke();\n }\n }\n };\n\n if (!fillStrokeOrder) {\n _runFill();\n _runStroke();\n } else {\n _runStroke();\n _runFill();\n }\n\n this.afterRenderStep(\n star,\n context,\n x,\n y,\n doFill,\n doStroke,\n fVisible,\n sVisible,\n starAttribute,\n drawContext,\n fillCb,\n strokeCb\n );\n }\n\n draw(star: IStar, renderService: IRenderService, drawContext: IDrawContext, params?: IGraphicRenderDrawParams) {\n const starAttribute = getTheme(star, params?.theme).star;\n this._draw(star, starAttribute, false, drawContext, params);\n }\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { IGraphicAttribute, IContext2d, IMarkAttribute, ISymbol, IThemeAttribute, ISymbolRenderContribution, IDrawContext, IRenderService, IGraphicRender, IGraphicRenderDrawParams, IContributionProvider, ISymbolGraphicAttribute } from '../../../interface';
|
|
2
2
|
import { BaseRender } from './base-render';
|
|
3
3
|
export declare class DefaultCanvasSymbolRender extends BaseRender<ISymbol> implements IGraphicRender {
|
|
4
|
-
protected readonly graphicRenderContributions: IContributionProvider<ISymbolRenderContribution>;
|
|
5
4
|
type: 'symbol';
|
|
6
5
|
numberType: number;
|
|
7
|
-
|
|
6
|
+
protected readonly graphicRenderContributions: IContributionProvider<ISymbolRenderContribution>;
|
|
7
|
+
constructor(graphicRenderContributions?: IContributionProvider<ISymbolRenderContribution>);
|
|
8
8
|
drawShape(symbol: ISymbol, context: IContext2d, x: number, y: number, drawContext: IDrawContext, params?: IGraphicRenderDrawParams, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, symbolAttribute?: Required<ISymbolGraphicAttribute>): void;
|
|
9
9
|
private _runFill;
|
|
10
10
|
private _runStroke;
|