@wcardinal/wcardinal-ui 0.405.0 → 0.406.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/dist/types/wcardinal/ui/d-base-background-snippet.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-base-border-snippet.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-base-outline-snippet.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-button-color.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-dialog.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dynamic-text-style.d.ts +17 -11
- package/dist/types/wcardinal/ui/d-dynamic-text.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-image-base.d.ts +1 -4
- package/dist/types/wcardinal/ui/d-image-piece-align.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-image-piece-container-impl.d.ts +14 -1
- package/dist/types/wcardinal/ui/d-image-piece-container.d.ts +11 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-container.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-image-piece-layouter.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-input.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-menu-item-text.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-scroll-bar.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-text-base.d.ts +15 -74
- package/dist/types/wcardinal/ui/d-text-piece-align-impl.d.ts +20 -0
- package/dist/types/wcardinal/ui/d-text-piece-align.d.ts +7 -0
- package/dist/types/wcardinal/ui/d-text-piece-impl.d.ts +63 -0
- package/dist/types/wcardinal/ui/d-text-piece-style-impl.d.ts +29 -0
- package/dist/types/wcardinal/ui/d-text-piece-style.d.ts +16 -0
- package/dist/types/wcardinal/ui/d-text-piece.d.ts +61 -0
- package/dist/types/wcardinal/ui/shape/e-shape-image-like.d.ts +6 -0
- package/dist/types/wcardinal/ui/shape/e-shape.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/index.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +4 -6
- package/dist/types/wcardinal/ui/shape/variant/e-shape-group-viewer.d.ts +6 -2
- package/dist/types/wcardinal/ui/shape/variant/e-shape-group.d.ts +6 -2
- package/dist/types/wcardinal/ui/shape/variant/e-shape-image-sdf.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-image.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-primitive.d.ts +7 -3
- package/dist/types/wcardinal/ui/shape/variant/to-image-element.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-input.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-input.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-dots.d.ts +5 -4
- package/dist/types/wcardinal/ui/util/dynamic-atlas-item-image.d.ts +2 -2
- package/dist/types/wcardinal/ui/util/dynamic-sdf-font-generator.d.ts +1 -1
- package/dist/wcardinal/ui/d-base-background-snippet.js.map +1 -1
- package/dist/wcardinal/ui/d-base-border-snippet.js.map +1 -1
- package/dist/wcardinal/ui/d-base-outline-snippet.js.map +1 -1
- package/dist/wcardinal/ui/d-button-color-gradient.js +10 -13
- package/dist/wcardinal/ui/d-button-color-gradient.js.map +1 -1
- package/dist/wcardinal/ui/d-button-color.js +20 -23
- package/dist/wcardinal/ui/d-button-color.js.map +1 -1
- package/dist/wcardinal/ui/d-button-date.js +4 -4
- package/dist/wcardinal/ui/d-button-date.js.map +1 -1
- package/dist/wcardinal/ui/d-button-datetime.js +4 -4
- package/dist/wcardinal/ui/d-button-datetime.js.map +1 -1
- package/dist/wcardinal/ui/d-button-select.js +2 -2
- package/dist/wcardinal/ui/d-button-select.js.map +1 -1
- package/dist/wcardinal/ui/d-button-time.js +4 -4
- package/dist/wcardinal/ui/d-button-time.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-processing.js +1 -1
- package/dist/wcardinal/ui/d-dialog-processing.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog.js.map +1 -1
- package/dist/wcardinal/ui/d-dynamic-text-style.js +39 -65
- package/dist/wcardinal/ui/d-dynamic-text-style.js.map +1 -1
- package/dist/wcardinal/ui/d-dynamic-text.js +11 -8
- package/dist/wcardinal/ui/d-dynamic-text.js.map +1 -1
- package/dist/wcardinal/ui/d-image-base.js +6 -18
- package/dist/wcardinal/ui/d-image-base.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-align.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-container-impl.js +49 -1
- package/dist/wcardinal/ui/d-image-piece-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-container.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-container.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter.js.map +1 -1
- package/dist/wcardinal/ui/d-indicator-processing.js +1 -1
- package/dist/wcardinal/ui/d-indicator-processing.js.map +1 -1
- package/dist/wcardinal/ui/d-input.js +11 -7
- package/dist/wcardinal/ui/d-input.js.map +1 -1
- package/dist/wcardinal/ui/d-menu-item-text.js +12 -6
- package/dist/wcardinal/ui/d-menu-item-text.js.map +1 -1
- package/dist/wcardinal/ui/d-scroll-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-date.js +7 -10
- package/dist/wcardinal/ui/d-table-body-cell-date.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-datetime.js +7 -10
- package/dist/wcardinal/ui/d-table-body-cell-datetime.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js +4 -10
- package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-select-promise.js +4 -10
- package/dist/wcardinal/ui/d-table-body-cell-select-promise.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-time.js +7 -10
- package/dist/wcardinal/ui/d-table-body-cell-time.js.map +1 -1
- package/dist/wcardinal/ui/d-text-base.js +55 -247
- package/dist/wcardinal/ui/d-text-base.js.map +1 -1
- package/dist/wcardinal/ui/d-text-piece-align-impl.js +69 -0
- package/dist/wcardinal/ui/d-text-piece-align-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece-align.js +2 -0
- package/dist/wcardinal/ui/d-text-piece-align.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece-impl.js +299 -0
- package/dist/wcardinal/ui/d-text-piece-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece-style-impl.js +146 -0
- package/dist/wcardinal/ui/d-text-piece-style-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece-style.js +2 -0
- package/dist/wcardinal/ui/d-text-piece-style.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece.js +2 -0
- package/dist/wcardinal/ui/d-text-piece.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-container.js +1 -1
- package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-image-like.js +2 -0
- package/dist/wcardinal/ui/shape/e-shape-image-like.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-renderer.js +7 -13
- package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +1 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image-sdf.js +4 -4
- package/dist/wcardinal/ui/shape/variant/create-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +0 -25
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js +6 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group.js +6 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-group.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js +15 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/to-image-element.js +9 -3
- package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js +6 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-select-multiple.js +9 -9
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-select-multiple.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-select.js +7 -7
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-input.js +6 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-input.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dots.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-select-multiple.js +9 -9
- package/dist/wcardinal/ui/theme/white/d-theme-white-select-multiple.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-select.js +7 -7
- package/dist/wcardinal/ui/theme/white/d-theme-white-select.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-atlas-item-image.js +18 -9
- package/dist/wcardinal/ui/util/dynamic-atlas-item-image.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js +1 -3
- package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +23 -17
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +23 -17
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +23 -17
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +23 -17
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +23 -17
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +23 -17
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +1110 -787
- package/dist/wcardinal-ui.js +1065 -754
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-renderer.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-renderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAEN,WAAW,EACX,cAAc,EAEd,MAAM,EAEN,KAAK,EACL,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,IAAM,aAAa,GAAG,0sKAoKpB,CAAC;AAEH,IAAM,eAAe,GAAG,o1DAoDtB,CAAC;AAEH;IAAoC,kCAAc;IAOjD,wBAAY,QAAkB;QAA9B,YACC,kBAAM,QAAQ,CAAC,SAMf;QALA,cAAc,CAAC,MAAM;YACpB,cAAc,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,e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AAI,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;iBACjD;qBAAM;oBACN,mBAAmB;oBACnB,MAAM;iBACN;aACD;SACD;QAED,IAAI,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE;YACxB,KAAK,IAAI,EAAE,GAAG,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,EAAE;gBAC3D,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;aACtB;YACD,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;SACpB;IACF,CAAC;IAhOM,qBAAM,GAAkB,IAAI,CAAC;IAiOrC,qBAAC;CAAA,AAlOD,CAAoC,cAAc,GAkOjD;SAlOY,cAAc","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n\tBaseTexture,\n\tBLEND_MODES,\n\tObjectRenderer,\n\tRenderer,\n\tShader,\n\tTexture,\n\tutils\n} from \"pixi.js\";\nimport { DynamicAtlas } from \"../util/dynamic-atlas\";\nimport { DynamicAtlasItemImage } from \"../util/dynamic-atlas-item-image\";\nimport { DynamicSDFFontAtlases } from \"../util/dynamic-sdf-font-atlases\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeBuffer } from \"./e-shape-buffer\";\nimport { EShapeContainer } from \"./e-shape-container\";\nimport { EShapeRendererIterator } from \"./e-shape-renderer-iterator\";\n\nconst VERTEX_SHADER = `\nattribute vec2 aPosition;\nattribute vec3 aClipping;\nattribute vec2 aStep;\nattribute vec4 aAntialias;\nattribute vec4 aColorFill;\nattribute vec4 aColorStroke;\nattribute vec2 aUv;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mediump float shapeScale;\nuniform mediump float pixelScale;\nuniform mediump float antialiasWeight;\n\nvarying mediump vec3 vClipping;\nvarying mediump vec2 vStep;\nvarying mediump vec4 vAntialias;\nvarying mediump vec4 vColorFill;\nvarying mediump vec4 vColorStroke;\nvarying mediump vec2 vUv;\n\nvec2 toInverse( in vec2 v ) {\n\treturn vec2( -v.y, v.x );\n}\n\nvec2 toTransformedPosition( in vec2 v ) {\n\treturn (projectionMatrix * translationMatrix * vec3(v, 1.0)).xy;\n}\n\nvec4 toAntialias01( in vec4 antialias ) {\n\t// Taylor series of 1 / ( 1 - a ) = 1 + a + a^2 + ....\n\treturn 1.0 + min( vec4( 1.0 ), antialias * pixelScale );\n}\n\nvec4 toAntialias2( in vec4 antialias, in float strokeWidth ) {\n\tfloat x = min( 0.4, 0.4 / 12.0 * antialias.x * pixelScale * antialiasWeight );\n\tfloat w = clamp( strokeWidth / antialias.y, 0.0, 1.0 ) * 0.4;\n\tfloat p = w * antialias.z + antialias.w;\n\tfloat y = 0.5 - p;\n\tfloat z = 0.5 - p - w;\n\treturn vec4( y, z, y - max( 0.01, y - x ), z - max( 0.01, z - x ) );\n}\n\nvec2 toPosition3456( in float type, in vec2 p, in vec2 pprev, in vec2 pnext, in float strokeWidth, out float shift ) {\n\tvec2 d0 = p - pprev;\n\tvec2 d1 = pnext - p;\n\tfloat l0 = dot( d0, d0 );\n\tfloat l1 = dot( d1, d1 );\n\tvec2 nd0 = normalize( toInverse( d0 ) );\n\tvec2 nd1 = normalize( toInverse( d1 ) );\n\tvec2 nd2 = 0.00001 < l1 ? nd1 : vec2(0.0, 0.0);\n\tvec2 n0 = 0.00001 < l0 ? nd0 : nd2;\n\tvec2 n1 = 0.00001 < l1 ? nd1 : n0;\n\tvec2 n0i = toInverse( n0 );\n\tvec2 n1i = toInverse( n1 );\n\tfloat direction = sign( 4.5 - type );\n\n\t// Offset\n\tfloat cross = dot( n0i, n1 );\n\tfloat crossInverse = ( 0.00001 < abs( cross ) ? 1.0 / cross : 0.0 );\n\tfloat b = dot(n1 - n0, n0) * crossInverse;\n\tfloat offsetSize = direction * strokeWidth * 0.5;\n\tvec2 offset = n1 + n1i * b;\n\n\t// Miter\n\tvec2 pmiter = p + offsetSize * offset;\n\tfloat miterAngle0 = dot( n0i, pmiter - pprev );\n\tfloat miterAngle1 = dot( n1i, pmiter - pnext );\n\tfloat miterLength = dot( offset, offset );\n\tfloat miterSide = direction * cross;\n\n\t// Bevel\n\tvec2 n = ( type == 4.0 || type == 6.0 ? n1 : n0 );\n\tvec2 pbevel = p + offsetSize * n;\n\n\t//\n\tvec2 presult = (\n\t\t0.0 <= miterSide ?\n\t\t( miterAngle0 < 0.0 && 0.0 <= miterAngle1 ? pmiter : pbevel ) :\n\t\t( miterLength < 6.0 ? pmiter : pbevel )\n\t);\n\tvec2 ni = ( type == 4.0 || type == 6.0 ? n1i : n0i );\n\tshift = dot( ni, p - presult );\n\treturn toTransformedPosition( presult );\n}\n\nvec2 toStep3456( in float type ) {\n\treturn ( type < 4.5 ? vec2( 1.0, 0.0 ) : vec2( 0.0, 1.0 ) );\n}\n\nvec4 toAntialias3456( in float strokeWidth ) {\n\tfloat a = antialiasWeight / max( 0.0001, strokeWidth );\n\treturn toAntialias01( vec4( a, a, a, a ) );\n}\n\nfloat toDotAndDashScale( in float scale, in float strokeWidthScale ) {\n\treturn (\n\t\tscale == 4.0 || scale == 5.0 || scale == 6.0 || scale == 7.0 ?\n\t\tstrokeWidthScale : 1.0\n\t);\n}\n\nvec4 toColorStroke3456( in float shift, in float scale ) {\n\tfloat x = aColorFill.x + shift;\n\tfloat y = scale * aColorFill.y;\n\tfloat z = scale * aColorFill.z;\n\tfloat w = aColorFill.w;\n\treturn vec4( x, y, z, w );\n}\n\nfloat toStrokeWidthScale( in float scale ) {\n\treturn (\n\t\tscale == 3.0 || scale == 7.0 ?\n\t\tshapeScale : (\n\t\t\tscale == 1.0 || scale == 5.0 ?\n\t\t\tmin( 1.0, shapeScale ) : (\n\t\t\t\tscale == 2.0 || scale == 6.0 ?\n\t\t\t\tmax( 1.0, shapeScale ) : 1.0\n\t\t\t)\n\t\t)\n\t);\n}\n\nvec2 toStep01(in vec2 size, in vec2 weight, in vec2 strokeWidth) {\n\treturn weight / max(vec2(0.00001), vec2(1.0) - strokeWidth / size);\n}\n\nvec4 toAntialias01b(in vec2 size, in vec2 strokeWidth) {\n\treturn antialiasWeight / max(vec4(0.00001), vec4(size - strokeWidth, size));\n}\n\nvoid main(void) {\n\tvec2 p012 = toTransformedPosition( aPosition );\n\n\tfloat type = aClipping.z;\n\tfloat strokeWidthScale = toStrokeWidthScale( aStep.y );\n\tfloat strokeWidth = strokeWidthScale * aStep.x;\n\n\t// type === 0 or 1\n\tvec2 size01 = aAntialias.xy;\n\tvec2 weight01 = abs(aAntialias.zw - sign(aAntialias.zw));\n\tvec2 strokeWidth01 = step(vec2(0.0), aAntialias.zw) * strokeWidth;\n\tvec2 step01 = toStep01( size01, weight01, strokeWidth01 );\n\tvec4 a01 = toAntialias01( toAntialias01b( size01, strokeWidth01 ) );\n\n\t// type === 2\n\tvec4 a2 = toAntialias2( aAntialias, strokeWidth );\n\n\t// type === 3, 4, 5 or 6\n\tfloat shift3456 = 0.0;\n\tvec2 p3456 = toPosition3456( type, aPosition, aAntialias.xy, aAntialias.zw, strokeWidth, shift3456 );\n\tvec2 step3456 = toStep3456( type );\n\tvec4 a3456 = toAntialias3456( strokeWidth );\n\tvec4 colorStroke3456 = toColorStroke3456( shift3456, toDotAndDashScale( aStep.y, strokeWidthScale ) );\n\n\t//\n\tgl_Position = vec4( ( 2.5 < type ? p3456 : p012 ), 0.0, 1.0 );\n\tvAntialias = ( 1.5 < type ? ( 2.5 < type ? a3456 : a2 ) : a01 );\n\tvClipping = aClipping;\n\tvStep = ( 2.5 < type ? step3456 : step01 );\n\tvColorFill = ( 2.5 < type ? aColorStroke : aColorFill );\n\tvColorStroke = ( 2.5 < type ? colorStroke3456 : aColorStroke );\n\tvUv = aUv;\n}`;\n\nconst FRAGMENT_SHADER = `\nvarying mediump vec3 vClipping;\nvarying mediump vec2 vStep;\nvarying mediump vec4 vAntialias;\nvarying mediump vec4 vColorFill;\nvarying mediump vec4 vColorStroke;\nvarying mediump vec2 vUv;\n\nuniform sampler2D sampler;\nuniform mediump float pixelScale;\n\nvec4 color1(float type, vec4 texture) {\n\tvec2 v0 = vStep;\n\tvec2 v1 = vClipping.xy;\n\tvec2 v2 = v0 * vAntialias.xy;\n\tvec2 v3 = v1 * vAntialias.zw;\n\tvec2 d01 = ( v0.x < v0.y ? vec2( v0.y, v2.y ) : vec2( v0.x, v2.x ) );\n\tvec2 d02 = ( v1.x < v1.y ? vec2( v1.y, v3.y ) : vec2( v1.x, v3.x ) );\n\tvec4 d0 = vec4( d01.x, d02.x, d01.y, d02.y );\n\tvec4 d1 = vec4( dot( v0, v0 ), dot( v1, v1 ), dot( v2, v2 ), dot( v3, v3 ) );\n\tvec4 d = (type == 1.0 ? d1 : d0);\n\tvec2 s = smoothstep( 1.0 - (d.zw - d.xy), vec2( 1.0 ), d.xy );\n\treturn texture * (vColorStroke * (s.x - s.y) + vColorFill * (1.0 - s.x));\n}\n\nvec4 color2(float type, vec4 texture) {\n\tvec2 a0 = vAntialias.xy;\n\tvec2 a1 = vAntialias.zw;\n\tvec2 a2 = vec2( (texture.b * 0.00392156862745098 + texture.g) * 0.00392156862745098 + texture.r );\n\tvec2 a = smoothstep( a0 - a1, a0 + a1, a2 );\n\treturn a.x * vColorFill + ( a.y - a.x ) * vColorStroke;\n}\n\nfloat color3456(float type, vec4 texture) {\n\tfloat l = vColorStroke.x;\n\tfloat lp0 = vColorStroke.y;\n\tfloat lp1 = vColorStroke.z;\n\tfloat lt = vColorStroke.w;\n\tfloat ld = 0.5 * pixelScale;\n\tfloat lm = mod( l, lp0 + lp1 );\n\tfloat ls0 = ( 0.0 < lp1 ? smoothstep( 0.0, ld, lm ) - smoothstep( lp0, lp0 + ld, lm ) : 1.0 );\n\tfloat ls1 = ( 0.0 <= lt ? smoothstep( 0.0, ld, l ) - smoothstep( lt - ld, lt, l ) : 1.0 );\n\treturn ls0 * ls1;\n}\n\nvoid main(void) {\n\tfloat type = vClipping.z;\n\tvec4 texture = texture2D(sampler, vUv);\n\tgl_FragColor = (type == 2.0 ?\n\t\tcolor2(type, texture) :\n\t\tcolor1(type, texture) * (2.5 < type ? color3456(type, texture) : 1.0)\n\t);\n}`;\n\nexport class EShapeRenderer extends ObjectRenderer {\n\tstatic SHADER: Shader | null = null;\n\n\tprotected _shader: Shader | null;\n\tprotected _iterator: EShapeRendererIterator;\n\tprotected _bufferSizeMax: number;\n\n\tconstructor(renderer: Renderer) {\n\t\tsuper(renderer);\n\t\tEShapeRenderer.SHADER =\n\t\t\tEShapeRenderer.SHADER || Shader.from(VERTEX_SHADER, FRAGMENT_SHADER);\n\t\tthis._shader = EShapeRenderer.SHADER;\n\t\tthis._iterator = new EShapeRendererIterator();\n\t\tthis._bufferSizeMax = this.getBufferSizeMax(renderer);\n\t}\n\n\tprotected getBufferSizeMax(renderer: Renderer): number {\n\t\tconst context = renderer.context;\n\t\tconst extensions = context.extensions as any;\n\t\tif (1 < context.webGLVersion || !!extensions.uint32ElementIndex) {\n\t\t\treturn 1431655765; // 2^32 / 3\n\t\t}\n\t\treturn 21845; // 2^16 / 3\n\t}\n\n\tupdateAtlas(\n\t\tshape: EShape,\n\t\tatlas: DynamicAtlas,\n\t\tfontAtlases: DynamicSDFFontAtlases,\n\t\tdefaultTexture: Texture,\n\t\tbaseTexture: BaseTexture\n\t): void {\n\t\t// Texture\n\t\t// Do not access the shape.image.src here.\n\t\t// It slows down the rendering speed significantly.\n\t\tconst imageSrc = shape.imageSrc;\n\t\tif (imageSrc != null) {\n\t\t\tconst textureItem = atlas.get(imageSrc);\n\t\t\tif (textureItem != null) {\n\t\t\t\tshape.texture = textureItem.texture;\n\t\t\t} else {\n\t\t\t\tconst image = shape.image;\n\t\t\t\tif (image != null) {\n\t\t\t\t\tconst newTextureItem = new DynamicAtlasItemImage(image, baseTexture);\n\t\t\t\t\tshape.texture = newTextureItem.texture;\n\t\t\t\t\tatlas.set(newTextureItem.id, newTextureItem);\n\t\t\t\t} else {\n\t\t\t\t\tshape.texture = defaultTexture;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tshape.texture = defaultTexture;\n\t\t}\n\n\t\t// Font texture atlas\n\t\tconst text = shape.text;\n\t\tconst textValue = text.value;\n\t\tif (0 < textValue.length) {\n\t\t\tfontAtlases.add(text.family, textValue);\n\t\t}\n\t}\n\n\tupdateAtlases(\n\t\tshapes: EShape[],\n\t\tatlas: DynamicAtlas,\n\t\tfontAtlases: DynamicSDFFontAtlases,\n\t\tdefaultTexture: Texture,\n\t\tbaseTexture: BaseTexture\n\t): void {\n\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\tconst shape = shapes[i];\n\t\t\tthis.updateAtlas(shape, atlas, fontAtlases, defaultTexture, baseTexture);\n\t\t\tconst children = shape.children;\n\t\t\tfor (let j = 0, jmax = children.length; j < jmax; ++j) {\n\t\t\t\tconst child = children[j];\n\t\t\t\tthis.updateAtlas(child, atlas, fontAtlases, defaultTexture, baseTexture);\n\t\t\t\tthis.updateAtlases(child.children, atlas, fontAtlases, defaultTexture, baseTexture);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdateFontAtlas(\n\t\tshape: EShape,\n\t\tatlas: DynamicAtlas,\n\t\tfontAtlases: DynamicSDFFontAtlases,\n\t\tdefaultTexture: Texture\n\t): void {\n\t\tconst text = shape.text;\n\t\tconst fontAtlas = fontAtlases.get(text.family);\n\t\tif (fontAtlas != null) {\n\t\t\tconst textureItem = atlas.get(fontAtlas.id);\n\t\t\tif (textureItem != null) {\n\t\t\t\ttext.atlas = fontAtlas;\n\t\t\t\ttext.texture = textureItem.texture;\n\t\t\t} else {\n\t\t\t\ttext.atlas = undefined;\n\t\t\t\ttext.texture = defaultTexture;\n\t\t\t}\n\t\t} else {\n\t\t\ttext.atlas = undefined;\n\t\t\ttext.texture = defaultTexture;\n\t\t}\n\t}\n\n\tupdateFontAtlases(\n\t\tshapes: EShape[],\n\t\tatlas: DynamicAtlas,\n\t\tfontAtlases: DynamicSDFFontAtlases,\n\t\tdefaultTexture: Texture\n\t): void {\n\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\tconst shape = shapes[i];\n\t\t\tthis.updateFontAtlas(shape, atlas, fontAtlases, defaultTexture);\n\t\t\tconst children = shape.children;\n\t\t\tfor (let j = 0, jmax = children.length; j < jmax; ++j) {\n\t\t\t\tconst child = children[j];\n\t\t\t\tthis.updateFontAtlas(child, atlas, fontAtlases, defaultTexture);\n\t\t\t\tthis.updateFontAtlases(child.children, atlas, fontAtlases, defaultTexture);\n\t\t\t}\n\t\t}\n\t}\n\n\trender_(\n\t\tcontainer: EShapeContainer,\n\t\tshape: EShape | null,\n\t\tshapes: EShape[],\n\t\tisDirty: boolean\n\t): void {\n\t\tconst renderer = this.renderer;\n\t\tconst shader = this._shader;\n\n\t\tif (shader != null && (shape != null || 0 < shapes.length)) {\n\t\t\tconst resolution = renderer.resolution;\n\t\t\tconst buffers = container.getBuffers();\n\t\t\tconst antialiasWeight = container.getAntialiasWeight(resolution);\n\n\t\t\t// Update textures\n\t\t\tif (isDirty) {\n\t\t\t\t// Atlases\n\t\t\t\tconst atlas = container.getAtlas(resolution);\n\t\t\t\tconst fontAtlases = container.getFontAtlases();\n\t\t\t\tatlas.begin();\n\t\t\t\tfontAtlases.begin();\n\t\t\t\tconst defaultTexture = atlas.getDefaultTexture();\n\t\t\t\tconst baseTexture: BaseTexture = atlas.getBaseTexture();\n\t\t\t\tthis.updateAtlases(shapes, atlas, fontAtlases, defaultTexture, baseTexture);\n\t\t\t\tfontAtlases.end();\n\t\t\t\tfontAtlases.update(atlas);\n\t\t\t\tthis.updateFontAtlases(shapes, atlas, fontAtlases, defaultTexture);\n\t\t\t\tatlas.end();\n\t\t\t\tatlas.repack();\n\n\t\t\t\t// Update buffers\n\t\t\t\tthis.updateBuffers(shape, shapes, buffers, renderer, antialiasWeight);\n\t\t\t}\n\n\t\t\t// Render buffers\n\t\t\tshader.uniforms.shapeScale = container.toShapeScale();\n\t\t\tshader.uniforms.pixelScale = container.toPixelScale(resolution);\n\t\t\tshader.uniforms.antialiasWeight = antialiasWeight;\n\t\t\tshader.uniforms.translationMatrix = container.worldTransform.toArray(true);\n\t\t\trenderer.shader.bind(shader, false);\n\t\t\trenderer.state.setBlendMode(utils.correctBlendMode(BLEND_MODES.NORMAL, true));\n\t\t\tconst buffersLength = buffers.length;\n\t\t\tif (1 < buffersLength) {\n\t\t\t\tfor (let i = 0; i < buffersLength; ++i) {\n\t\t\t\t\tbuffers[i].upload();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let i = 0; i < buffersLength; ++i) {\n\t\t\t\tbuffers[i].render(shader);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdateBuffers(\n\t\tshape: EShape | null,\n\t\tshapes: EShape[],\n\t\tbuffers: EShapeBuffer[],\n\t\trenderer: Renderer,\n\t\tantialiasWeight: number\n\t): void {\n\t\tconst iterator = this._iterator;\n\t\titerator.reset(shape, shapes);\n\n\t\tlet ib = 0;\n\t\tlet bufferSize = 0;\n\t\tconst bufferSizeBase = 5000;\n\t\tconst bufferSizeMax = this._bufferSizeMax;\n\t\twhile (iterator.get() != null) {\n\t\t\tlet buffer: EShapeBuffer | null = null;\n\t\t\tlet noMoreThanOne = false;\n\t\t\tif (0 < bufferSize) {\n\t\t\t\tbuffer = new EShapeBuffer(bufferSize, renderer);\n\t\t\t\tbuffers.splice(ib, 0, buffer);\n\t\t\t\tnoMoreThanOne = true;\n\t\t\t} else if (ib < buffers.length) {\n\t\t\t\tbuffer = buffers[ib];\n\t\t\t\tnoMoreThanOne = false;\n\t\t\t} else {\n\t\t\t\tbuffer = new EShapeBuffer(bufferSizeBase, renderer);\n\t\t\t\tbuffers.push(buffer);\n\t\t\t\tnoMoreThanOne = false;\n\t\t\t}\n\t\t\tif (buffer.update(iterator, antialiasWeight, noMoreThanOne)) {\n\t\t\t\tbufferSize = 0;\n\t\t\t\tib += 1;\n\t\t\t} else {\n\t\t\t\tbufferSize = buffer.indexCountRequested;\n\t\t\t\tif (bufferSize <= bufferSizeMax) {\n\t\t\t\t\tbufferSize = Math.ceil(bufferSize / bufferSizeBase) * bufferSizeBase;\n\t\t\t\t\tbufferSize = Math.min(bufferSize, bufferSizeMax);\n\t\t\t\t} else {\n\t\t\t\t\t// No way to render\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (ib < buffers.length) {\n\t\t\tfor (let jb = ib, ibmax = buffers.length; jb < ibmax; ++jb) {\n\t\t\t\tbuffers[jb].destroy();\n\t\t\t}\n\t\t\tbuffers.length = ib;\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-renderer.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-renderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAEN,WAAW,EACX,cAAc,EAEd,MAAM,EAEN,KAAK,EACL,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,IAAM,aAAa,GAAG,0sKAoKpB,CAAC;AAEH,IAAM,eAAe,GAAG,o1DAoDtB,CAAC;AAEH;IAAoC,kCAAc;IAOjD,wBAAY,QAAkB;QAA9B,YACC,kBAAM,QAAQ,CAAC,SAMf;QALA,cAAc,CAAC,MAAM;YACpB,cAAc,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;QACtE,KAAI,CAAC,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC;QACrC,KAAI,CAAC,SAAS,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAC9C,KAAI,CAAC,cAAc,GAAG,KAAI,CAAC,gBAAgB,CAAC,QAAQ,CA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E,EAAE,EAAE,EAAE;gBAC3D,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;aACtB;YACD,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;SACpB;IACF,CAAC;IAjOM,qBAAM,GAAkB,IAAI,CAAC;IAkOrC,qBAAC;CAAA,AAnOD,CAAoC,cAAc,GAmOjD;SAnOY,cAAc","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n\tBaseTexture,\n\tBLEND_MODES,\n\tObjectRenderer,\n\tRenderer,\n\tShader,\n\tTexture,\n\tutils\n} from \"pixi.js\";\nimport { DynamicAtlas } from \"../util/dynamic-atlas\";\nimport { DynamicAtlasItemImage } from \"../util/dynamic-atlas-item-image\";\nimport { DynamicSDFFontAtlases } from \"../util/dynamic-sdf-font-atlases\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeBuffer } from \"./e-shape-buffer\";\nimport { EShapeContainer } from \"./e-shape-container\";\nimport { EShapeRendererIterator } from \"./e-shape-renderer-iterator\";\n\nconst VERTEX_SHADER = `\nattribute vec2 aPosition;\nattribute vec3 aClipping;\nattribute vec2 aStep;\nattribute vec4 aAntialias;\nattribute vec4 aColorFill;\nattribute vec4 aColorStroke;\nattribute vec2 aUv;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mediump float shapeScale;\nuniform mediump float pixelScale;\nuniform mediump float antialiasWeight;\n\nvarying mediump vec3 vClipping;\nvarying mediump vec2 vStep;\nvarying mediump vec4 vAntialias;\nvarying mediump vec4 vColorFill;\nvarying mediump vec4 vColorStroke;\nvarying mediump vec2 vUv;\n\nvec2 toInverse( in vec2 v ) {\n\treturn vec2( -v.y, v.x );\n}\n\nvec2 toTransformedPosition( in vec2 v ) {\n\treturn (projectionMatrix * translationMatrix * vec3(v, 1.0)).xy;\n}\n\nvec4 toAntialias01( in vec4 antialias ) {\n\t// Taylor series of 1 / ( 1 - a ) = 1 + a + a^2 + ....\n\treturn 1.0 + min( vec4( 1.0 ), antialias * pixelScale );\n}\n\nvec4 toAntialias2( in vec4 antialias, in float strokeWidth ) {\n\tfloat x = min( 0.4, 0.4 / 12.0 * antialias.x * pixelScale * antialiasWeight );\n\tfloat w = clamp( strokeWidth / antialias.y, 0.0, 1.0 ) * 0.4;\n\tfloat p = w * antialias.z + antialias.w;\n\tfloat y = 0.5 - p;\n\tfloat z = 0.5 - p - w;\n\treturn vec4( y, z, y - max( 0.01, y - x ), z - max( 0.01, z - x ) );\n}\n\nvec2 toPosition3456( in float type, in vec2 p, in vec2 pprev, in vec2 pnext, in float strokeWidth, out float shift ) {\n\tvec2 d0 = p - pprev;\n\tvec2 d1 = pnext - p;\n\tfloat l0 = dot( d0, d0 );\n\tfloat l1 = dot( d1, d1 );\n\tvec2 nd0 = normalize( toInverse( d0 ) );\n\tvec2 nd1 = normalize( toInverse( d1 ) );\n\tvec2 nd2 = 0.00001 < l1 ? nd1 : vec2(0.0, 0.0);\n\tvec2 n0 = 0.00001 < l0 ? nd0 : nd2;\n\tvec2 n1 = 0.00001 < l1 ? nd1 : n0;\n\tvec2 n0i = toInverse( n0 );\n\tvec2 n1i = toInverse( n1 );\n\tfloat direction = sign( 4.5 - type );\n\n\t// Offset\n\tfloat cross = dot( n0i, n1 );\n\tfloat crossInverse = ( 0.00001 < abs( cross ) ? 1.0 / cross : 0.0 );\n\tfloat b = dot(n1 - n0, n0) * crossInverse;\n\tfloat offsetSize = direction * strokeWidth * 0.5;\n\tvec2 offset = n1 + n1i * b;\n\n\t// Miter\n\tvec2 pmiter = p + offsetSize * offset;\n\tfloat miterAngle0 = dot( n0i, pmiter - pprev );\n\tfloat miterAngle1 = dot( n1i, pmiter - pnext );\n\tfloat miterLength = dot( offset, offset );\n\tfloat miterSide = direction * cross;\n\n\t// Bevel\n\tvec2 n = ( type == 4.0 || type == 6.0 ? n1 : n0 );\n\tvec2 pbevel = p + offsetSize * n;\n\n\t//\n\tvec2 presult = (\n\t\t0.0 <= miterSide ?\n\t\t( miterAngle0 < 0.0 && 0.0 <= miterAngle1 ? pmiter : pbevel ) :\n\t\t( miterLength < 6.0 ? pmiter : pbevel )\n\t);\n\tvec2 ni = ( type == 4.0 || type == 6.0 ? n1i : n0i );\n\tshift = dot( ni, p - presult );\n\treturn toTransformedPosition( presult );\n}\n\nvec2 toStep3456( in float type ) {\n\treturn ( type < 4.5 ? vec2( 1.0, 0.0 ) : vec2( 0.0, 1.0 ) );\n}\n\nvec4 toAntialias3456( in float strokeWidth ) {\n\tfloat a = antialiasWeight / max( 0.0001, strokeWidth );\n\treturn toAntialias01( vec4( a, a, a, a ) );\n}\n\nfloat toDotAndDashScale( in float scale, in float strokeWidthScale ) {\n\treturn (\n\t\tscale == 4.0 || scale == 5.0 || scale == 6.0 || scale == 7.0 ?\n\t\tstrokeWidthScale : 1.0\n\t);\n}\n\nvec4 toColorStroke3456( in float shift, in float scale ) {\n\tfloat x = aColorFill.x + shift;\n\tfloat y = scale * aColorFill.y;\n\tfloat z = scale * aColorFill.z;\n\tfloat w = aColorFill.w;\n\treturn vec4( x, y, z, w );\n}\n\nfloat toStrokeWidthScale( in float scale ) {\n\treturn (\n\t\tscale == 3.0 || scale == 7.0 ?\n\t\tshapeScale : (\n\t\t\tscale == 1.0 || scale == 5.0 ?\n\t\t\tmin( 1.0, shapeScale ) : (\n\t\t\t\tscale == 2.0 || scale == 6.0 ?\n\t\t\t\tmax( 1.0, shapeScale ) : 1.0\n\t\t\t)\n\t\t)\n\t);\n}\n\nvec2 toStep01(in vec2 size, in vec2 weight, in vec2 strokeWidth) {\n\treturn weight / max(vec2(0.00001), vec2(1.0) - strokeWidth / size);\n}\n\nvec4 toAntialias01b(in vec2 size, in vec2 strokeWidth) {\n\treturn antialiasWeight / max(vec4(0.00001), vec4(size - strokeWidth, size));\n}\n\nvoid main(void) {\n\tvec2 p012 = toTransformedPosition( aPosition );\n\n\tfloat type = aClipping.z;\n\tfloat strokeWidthScale = toStrokeWidthScale( aStep.y );\n\tfloat strokeWidth = strokeWidthScale * aStep.x;\n\n\t// type === 0 or 1\n\tvec2 size01 = aAntialias.xy;\n\tvec2 weight01 = abs(aAntialias.zw - sign(aAntialias.zw));\n\tvec2 strokeWidth01 = step(vec2(0.0), aAntialias.zw) * strokeWidth;\n\tvec2 step01 = toStep01( size01, weight01, strokeWidth01 );\n\tvec4 a01 = toAntialias01( toAntialias01b( size01, strokeWidth01 ) );\n\n\t// type === 2\n\tvec4 a2 = toAntialias2( aAntialias, strokeWidth );\n\n\t// type === 3, 4, 5 or 6\n\tfloat shift3456 = 0.0;\n\tvec2 p3456 = toPosition3456( type, aPosition, aAntialias.xy, aAntialias.zw, strokeWidth, shift3456 );\n\tvec2 step3456 = toStep3456( type );\n\tvec4 a3456 = toAntialias3456( strokeWidth );\n\tvec4 colorStroke3456 = toColorStroke3456( shift3456, toDotAndDashScale( aStep.y, strokeWidthScale ) );\n\n\t//\n\tgl_Position = vec4( ( 2.5 < type ? p3456 : p012 ), 0.0, 1.0 );\n\tvAntialias = ( 1.5 < type ? ( 2.5 < type ? a3456 : a2 ) : a01 );\n\tvClipping = aClipping;\n\tvStep = ( 2.5 < type ? step3456 : step01 );\n\tvColorFill = ( 2.5 < type ? aColorStroke : aColorFill );\n\tvColorStroke = ( 2.5 < type ? colorStroke3456 : aColorStroke );\n\tvUv = aUv;\n}`;\n\nconst FRAGMENT_SHADER = `\nvarying mediump vec3 vClipping;\nvarying mediump vec2 vStep;\nvarying mediump vec4 vAntialias;\nvarying mediump vec4 vColorFill;\nvarying mediump vec4 vColorStroke;\nvarying mediump vec2 vUv;\n\nuniform sampler2D sampler;\nuniform mediump float pixelScale;\n\nvec4 color1(float type, vec4 texture) {\n\tvec2 v0 = vStep;\n\tvec2 v1 = vClipping.xy;\n\tvec2 v2 = v0 * vAntialias.xy;\n\tvec2 v3 = v1 * vAntialias.zw;\n\tvec2 d01 = ( v0.x < v0.y ? vec2( v0.y, v2.y ) : vec2( v0.x, v2.x ) );\n\tvec2 d02 = ( v1.x < v1.y ? vec2( v1.y, v3.y ) : vec2( v1.x, v3.x ) );\n\tvec4 d0 = vec4( d01.x, d02.x, d01.y, d02.y );\n\tvec4 d1 = vec4( dot( v0, v0 ), dot( v1, v1 ), dot( v2, v2 ), dot( v3, v3 ) );\n\tvec4 d = (type == 1.0 ? d1 : d0);\n\tvec2 s = smoothstep( 1.0 - (d.zw - d.xy), vec2( 1.0 ), d.xy );\n\treturn texture * (vColorStroke * (s.x - s.y) + vColorFill * (1.0 - s.x));\n}\n\nvec4 color2(float type, vec4 texture) {\n\tvec2 a0 = vAntialias.xy;\n\tvec2 a1 = vAntialias.zw;\n\tvec2 a2 = vec2( (texture.b * 0.00392156862745098 + texture.g) * 0.00392156862745098 + texture.r );\n\tvec2 a = smoothstep( a0 - a1, a0 + a1, a2 );\n\treturn a.x * vColorFill + ( a.y - a.x ) * vColorStroke;\n}\n\nfloat color3456(float type, vec4 texture) {\n\tfloat l = vColorStroke.x;\n\tfloat lp0 = vColorStroke.y;\n\tfloat lp1 = vColorStroke.z;\n\tfloat lt = vColorStroke.w;\n\tfloat ld = 0.5 * pixelScale;\n\tfloat lm = mod( l, lp0 + lp1 );\n\tfloat ls0 = ( 0.0 < lp1 ? smoothstep( 0.0, ld, lm ) - smoothstep( lp0, lp0 + ld, lm ) : 1.0 );\n\tfloat ls1 = ( 0.0 <= lt ? smoothstep( 0.0, ld, l ) - smoothstep( lt - ld, lt, l ) : 1.0 );\n\treturn ls0 * ls1;\n}\n\nvoid main(void) {\n\tfloat type = vClipping.z;\n\tvec4 texture = texture2D(sampler, vUv);\n\tgl_FragColor = (type == 2.0 ?\n\t\tcolor2(type, texture) :\n\t\tcolor1(type, texture) * (2.5 < type ? color3456(type, texture) : 1.0)\n\t);\n}`;\n\nexport class EShapeRenderer extends ObjectRenderer {\n\tstatic SHADER: Shader | null = null;\n\n\tprotected _shader: Shader | null;\n\tprotected _iterator: EShapeRendererIterator;\n\tprotected _bufferSizeMax: number;\n\n\tconstructor(renderer: Renderer) {\n\t\tsuper(renderer);\n\t\tEShapeRenderer.SHADER =\n\t\t\tEShapeRenderer.SHADER || Shader.from(VERTEX_SHADER, FRAGMENT_SHADER);\n\t\tthis._shader = EShapeRenderer.SHADER;\n\t\tthis._iterator = new EShapeRendererIterator();\n\t\tthis._bufferSizeMax = this.getBufferSizeMax(renderer);\n\t}\n\n\tprotected getBufferSizeMax(renderer: Renderer): number {\n\t\tconst context = renderer.context;\n\t\tconst extensions = context.extensions as any;\n\t\tif (1 < context.webGLVersion || !!extensions.uint32ElementIndex) {\n\t\t\treturn 1431655765; // 2^32 / 3\n\t\t}\n\t\treturn 21845; // 2^16 / 3\n\t}\n\n\tupdateAtlas(\n\t\tshape: EShape,\n\t\tatlas: DynamicAtlas,\n\t\tfontAtlases: DynamicSDFFontAtlases,\n\t\tdefaultTexture: Texture,\n\t\tbaseTexture: BaseTexture\n\t): void {\n\t\t// Texture\n\t\t// Do not access the shape.image.source here.\n\t\t// It slows down the rendering speed significantly.\n\t\tconst image = shape.image;\n\t\tif (image != null) {\n\t\t\tconst textureItem = atlas.get(image.url);\n\t\t\tif (textureItem != null) {\n\t\t\t\tshape.texture = textureItem.texture;\n\t\t\t} else {\n\t\t\t\tconst newTextureItem = new DynamicAtlasItemImage(\n\t\t\t\t\timage.url,\n\t\t\t\t\timage.width,\n\t\t\t\t\timage.height,\n\t\t\t\t\timage.source,\n\t\t\t\t\tbaseTexture\n\t\t\t\t);\n\t\t\t\tshape.texture = newTextureItem.texture;\n\t\t\t\tatlas.set(newTextureItem.id, newTextureItem);\n\t\t\t}\n\t\t} else {\n\t\t\tshape.texture = defaultTexture;\n\t\t}\n\n\t\t// Font texture atlas\n\t\tconst text = shape.text;\n\t\tconst textValue = text.value;\n\t\tif (0 < textValue.length) {\n\t\t\tfontAtlases.add(text.family, textValue);\n\t\t}\n\t}\n\n\tupdateAtlases(\n\t\tshapes: EShape[],\n\t\tatlas: DynamicAtlas,\n\t\tfontAtlases: DynamicSDFFontAtlases,\n\t\tdefaultTexture: Texture,\n\t\tbaseTexture: BaseTexture\n\t): void {\n\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\tconst shape = shapes[i];\n\t\t\tthis.updateAtlas(shape, atlas, fontAtlases, defaultTexture, baseTexture);\n\t\t\tconst children = shape.children;\n\t\t\tfor (let j = 0, jmax = children.length; j < jmax; ++j) {\n\t\t\t\tconst child = children[j];\n\t\t\t\tthis.updateAtlas(child, atlas, fontAtlases, defaultTexture, baseTexture);\n\t\t\t\tthis.updateAtlases(child.children, atlas, fontAtlases, defaultTexture, baseTexture);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdateFontAtlas(\n\t\tshape: EShape,\n\t\tatlas: DynamicAtlas,\n\t\tfontAtlases: DynamicSDFFontAtlases,\n\t\tdefaultTexture: Texture\n\t): void {\n\t\tconst text = shape.text;\n\t\tconst fontAtlas = fontAtlases.get(text.family);\n\t\tif (fontAtlas != null) {\n\t\t\tconst textureItem = atlas.get(fontAtlas.id);\n\t\t\tif (textureItem != null) {\n\t\t\t\ttext.atlas = fontAtlas;\n\t\t\t\ttext.texture = textureItem.texture;\n\t\t\t} else {\n\t\t\t\ttext.atlas = undefined;\n\t\t\t\ttext.texture = defaultTexture;\n\t\t\t}\n\t\t} else {\n\t\t\ttext.atlas = undefined;\n\t\t\ttext.texture = defaultTexture;\n\t\t}\n\t}\n\n\tupdateFontAtlases(\n\t\tshapes: EShape[],\n\t\tatlas: DynamicAtlas,\n\t\tfontAtlases: DynamicSDFFontAtlases,\n\t\tdefaultTexture: Texture\n\t): void {\n\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\tconst shape = shapes[i];\n\t\t\tthis.updateFontAtlas(shape, atlas, fontAtlases, defaultTexture);\n\t\t\tconst children = shape.children;\n\t\t\tfor (let j = 0, jmax = children.length; j < jmax; ++j) {\n\t\t\t\tconst child = children[j];\n\t\t\t\tthis.updateFontAtlas(child, atlas, fontAtlases, defaultTexture);\n\t\t\t\tthis.updateFontAtlases(child.children, atlas, fontAtlases, defaultTexture);\n\t\t\t}\n\t\t}\n\t}\n\n\trender_(\n\t\tcontainer: EShapeContainer,\n\t\tshape: EShape | null,\n\t\tshapes: EShape[],\n\t\tisDirty: boolean\n\t): void {\n\t\tconst renderer = this.renderer;\n\t\tconst shader = this._shader;\n\n\t\tif (shader != null && (shape != null || 0 < shapes.length)) {\n\t\t\tconst resolution = renderer.resolution;\n\t\t\tconst buffers = container.getBuffers();\n\t\t\tconst antialiasWeight = container.getAntialiasWeight(resolution);\n\n\t\t\t// Update textures\n\t\t\tif (isDirty) {\n\t\t\t\t// Atlases\n\t\t\t\tconst atlas = container.getAtlas(resolution);\n\t\t\t\tconst fontAtlases = container.getFontAtlases();\n\t\t\t\tatlas.begin();\n\t\t\t\tfontAtlases.begin();\n\t\t\t\tconst defaultTexture = atlas.getDefaultTexture();\n\t\t\t\tconst baseTexture: BaseTexture = atlas.getBaseTexture();\n\t\t\t\tthis.updateAtlases(shapes, atlas, fontAtlases, defaultTexture, baseTexture);\n\t\t\t\tfontAtlases.end();\n\t\t\t\tfontAtlases.update(atlas);\n\t\t\t\tthis.updateFontAtlases(shapes, atlas, fontAtlases, defaultTexture);\n\t\t\t\tatlas.end();\n\t\t\t\tatlas.repack();\n\n\t\t\t\t// Update buffers\n\t\t\t\tthis.updateBuffers(shape, shapes, buffers, renderer, antialiasWeight);\n\t\t\t}\n\n\t\t\t// Render buffers\n\t\t\tshader.uniforms.shapeScale = container.toShapeScale();\n\t\t\tshader.uniforms.pixelScale = container.toPixelScale(resolution);\n\t\t\tshader.uniforms.antialiasWeight = antialiasWeight;\n\t\t\tshader.uniforms.translationMatrix = container.worldTransform.toArray(true);\n\t\t\trenderer.shader.bind(shader, false);\n\t\t\trenderer.state.setBlendMode(utils.correctBlendMode(BLEND_MODES.NORMAL, true));\n\t\t\tconst buffersLength = buffers.length;\n\t\t\tif (1 < buffersLength) {\n\t\t\t\tfor (let i = 0; i < buffersLength; ++i) {\n\t\t\t\t\tbuffers[i].upload();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let i = 0; i < buffersLength; ++i) {\n\t\t\t\tbuffers[i].render(shader);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdateBuffers(\n\t\tshape: EShape | null,\n\t\tshapes: EShape[],\n\t\tbuffers: EShapeBuffer[],\n\t\trenderer: Renderer,\n\t\tantialiasWeight: number\n\t): void {\n\t\tconst iterator = this._iterator;\n\t\titerator.reset(shape, shapes);\n\n\t\tlet ib = 0;\n\t\tlet bufferSize = 0;\n\t\tconst bufferSizeBase = 5000;\n\t\tconst bufferSizeMax = this._bufferSizeMax;\n\t\twhile (iterator.get() != null) {\n\t\t\tlet buffer: EShapeBuffer | null = null;\n\t\t\tlet noMoreThanOne = false;\n\t\t\tif (0 < bufferSize) {\n\t\t\t\tbuffer = new EShapeBuffer(bufferSize, renderer);\n\t\t\t\tbuffers.splice(ib, 0, buffer);\n\t\t\t\tnoMoreThanOne = true;\n\t\t\t} else if (ib < buffers.length) {\n\t\t\t\tbuffer = buffers[ib];\n\t\t\t\tnoMoreThanOne = false;\n\t\t\t} else {\n\t\t\t\tbuffer = new EShapeBuffer(bufferSizeBase, renderer);\n\t\t\t\tbuffers.push(buffer);\n\t\t\t\tnoMoreThanOne = false;\n\t\t\t}\n\t\t\tif (buffer.update(iterator, antialiasWeight, noMoreThanOne)) {\n\t\t\t\tbufferSize = 0;\n\t\t\t\tib += 1;\n\t\t\t} else {\n\t\t\t\tbufferSize = buffer.indexCountRequested;\n\t\t\t\tif (bufferSize <= bufferSizeMax) {\n\t\t\t\t\tbufferSize = Math.ceil(bufferSize / bufferSizeBase) * bufferSizeBase;\n\t\t\t\t\tbufferSize = Math.min(bufferSize, bufferSizeMax);\n\t\t\t\t} else {\n\t\t\t\t\t// No way to render\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (ib < buffers.length) {\n\t\t\tfor (let jb = ib, ibmax = buffers.length; jb < ibmax; ++jb) {\n\t\t\t\tbuffers[jb].destroy();\n\t\t\t}\n\t\t\tbuffers.length = ib;\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject, IPoint, Point, Rectangle, Renderer, Texture, utils } from \"pixi.js\";\nimport { DDiagramSerializedItem } from \"../d-diagram-serialized\";\nimport { EShapeAction } from \"./action/e-shape-action\";\nimport { EShapeContainer } from \"./e-shape-container\";\nimport { EShapeCopyPart } from \"./e-shape-copy-part\";\nimport { EShapeCorner } from \"./e-shape-corner\";\nimport { EShapeEditor } from \"./e-shape-editor\";\nimport { EShapeFill } from \"./e-shape-fill\";\nimport { EShapeGradientLike } from \"./e-shape-gradient\";\nimport { EShapeLayout } from \"./e-shape-layout\";\nimport { EShapePoints } from \"./e-shape-points\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeRuntime } from \"./e-shape-runtime\";\nimport { EShapeStateSet } from \"./e-shape-state-set\";\nimport { EShapeStroke } from \"./e-shape-stroke\";\nimport { EShapeData } from \"./e-shape-data\";\nimport { EShapeText } from \"./e-shape-text\";\nimport { EShapeTransform } from \"./e-shape-transform\";\nimport { EShapeType } from \"./e-shape-type\";\nimport { EShapeUploaded } from \"./e-shape-uploaded\";\nimport { EShapeConnectorContainer } from \"./e-shape-connector-container\";\nimport { EShapeCapabilityContainer } from \"./e-shape-capability-container\";\nimport { EShapeLockPart } from \"./variant/e-shape-lock-part\";\n\nexport interface EShape extends utils.EventEmitter {\n\tid: string; // Used to identity a shape by users\n\tuuid: number; // Used to identify a shape uniquely\n\treadonly type: EShapeType;\n\treadonly size: IPoint;\n\treadonly fill: EShapeFill;\n\treadonly stroke: EShapeStroke;\n\treadonly transform: EShapeTransform;\n\tradius: number;\n\tcorner: EShapeCorner;\n\treadonly points?: EShapePoints;\n\timage?:
|
|
1
|
+
{"version":3,"file":"e-shape.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject, IPoint, Point, Rectangle, Renderer, Texture, utils } from \"pixi.js\";\nimport { DDiagramSerializedItem } from \"../d-diagram-serialized\";\nimport { EShapeAction } from \"./action/e-shape-action\";\nimport { EShapeContainer } from \"./e-shape-container\";\nimport { EShapeCopyPart } from \"./e-shape-copy-part\";\nimport { EShapeCorner } from \"./e-shape-corner\";\nimport { EShapeEditor } from \"./e-shape-editor\";\nimport { EShapeFill } from \"./e-shape-fill\";\nimport { EShapeGradientLike } from \"./e-shape-gradient\";\nimport { EShapeLayout } from \"./e-shape-layout\";\nimport { EShapePoints } from \"./e-shape-points\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeRuntime } from \"./e-shape-runtime\";\nimport { EShapeStateSet } from \"./e-shape-state-set\";\nimport { EShapeStroke } from \"./e-shape-stroke\";\nimport { EShapeData } from \"./e-shape-data\";\nimport { EShapeText } from \"./e-shape-text\";\nimport { EShapeTransform } from \"./e-shape-transform\";\nimport { EShapeType } from \"./e-shape-type\";\nimport { EShapeUploaded } from \"./e-shape-uploaded\";\nimport { EShapeConnectorContainer } from \"./e-shape-connector-container\";\nimport { EShapeCapabilityContainer } from \"./e-shape-capability-container\";\nimport { EShapeLockPart } from \"./variant/e-shape-lock-part\";\nimport { EShapeImageLike } from \"./e-shape-image-like\";\n\nexport interface EShape extends utils.EventEmitter {\n\tid: string; // Used to identity a shape by users\n\tuuid: number; // Used to identify a shape uniquely\n\treadonly type: EShapeType;\n\treadonly size: IPoint;\n\treadonly fill: EShapeFill;\n\treadonly stroke: EShapeStroke;\n\treadonly transform: EShapeTransform;\n\tradius: number;\n\tcorner: EShapeCorner;\n\treadonly points?: EShapePoints;\n\timage?: EShapeImageLike;\n\ttexture?: Texture;\n\tgradient?: EShapeGradientLike;\n\treadonly text: EShapeText;\n\t/** @deprecated in favor of {@link data}. */\n\treadonly tag: EShapeData;\n\treadonly data: EShapeData;\n\treadonly action: EShapeAction;\n\tcursor?: string;\n\tvisible: boolean;\n\treadonly worldVisible: boolean;\n\tinteractive: boolean;\n\tshortcut?: string;\n\ttitle?: string;\n\tconnector: EShapeConnectorContainer;\n\n\t// Hierarchy\n\tparent: EShapeContainer | EShape | null;\n\troot: EShape;\n\tchildren: EShape[];\n\tlayout?: EShapeLayout;\n\n\t// Working space\n\tindex: number; // A work space for sorting.\n\tselected: boolean;\n\treference: number; // Count of references from commands\n\n\t// Working space for the viewer\n\truntime?: EShapeRuntime;\n\n\t// Working space for the editor\n\teditor?: EShapeEditor;\n\n\t// Working space for the renderer\n\tuploaded?: EShapeUploaded;\n\n\t// State\n\treadonly state: EShapeStateSet;\n\n\t// Capability\n\treadonly capability: EShapeCapabilityContainer;\n\tgetCapability(): EShapeCapabilityContainer | undefined;\n\n\t//\n\ttoDirty(): void;\n\tattach(parent: EShapeContainer | EShape, at?: number): this;\n\tonAttach(): void;\n\tdetach(exceptions?: Set<EShape>): this;\n\tonDetach(exceptions?: Set<EShape>): void;\n\tcopy(source: EShape): this;\n\tcopy(source: EShape, part: EShapeCopyPart): this;\n\tclone(): EShape;\n\tdestroy(): void;\n\n\t//\n\tfocus(): this;\n\tblur(): this;\n\n\t//\n\tonSizeChange(): void;\n\n\t// Action\n\tupdate(time: number): void;\n\tonRender(time: number, renderer: Renderer): void;\n\n\t// Lock & unlock\n\tlock(part: EShapeLockPart): this;\n\tunlock(part: EShapeLockPart, invoke: boolean): this;\n\n\t// Transform\n\tupdateTransform(): void;\n\tonTransformChange(): void;\n\tonParentTransformChange(): void;\n\tonChildTransformChange(): void;\n\n\t// Uploaded\n\tupdateUploaded(recursively?: boolean): void;\n\n\t// Serialization\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem;\n\taddUuid(manager: EShapeResourceManagerSerialization): void;\n\tupdateUuid(manager: EShapeResourceManagerSerialization): void;\n\n\t// Hit test\n\tcontains(x: number, y: number): EShape | null;\n\tcontainsBBox(x: number, y: number): boolean;\n\tcontainsAbs(\n\t\tx: number,\n\t\ty: number,\n\t\tax: number,\n\t\tay: number,\n\t\tsw: number,\n\t\tss: number,\n\t\tsa: number\n\t): boolean;\n\tcontainsAbsBBox(x: number, y: number, ax: number, ay: number): boolean;\n\n\t// Coordinate\n\ttoGlobal(position: IPoint, result: Point, skipUpdate?: boolean): Point;\n\ttoLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point;\n\tgetBounds(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n\tgetBoundsInternal(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n\tgetBoundsLocal(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n}\n"]}
|
|
@@ -63,6 +63,7 @@ export * from "./e-shape-deserializers";
|
|
|
63
63
|
export * from "./e-shape-editor";
|
|
64
64
|
export * from "./e-shape-fill";
|
|
65
65
|
export * from "./e-shape-gradient";
|
|
66
|
+
export * from "./e-shape-image-like";
|
|
66
67
|
export * from "./e-shape-layer-container";
|
|
67
68
|
export * from "./e-shape-layer-state";
|
|
68
69
|
export * from "./e-shape-layer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc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C;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-edge-normal\";\nexport * from \"./e-shape-acceptor-edge-side\";\nexport * from \"./e-shape-acceptor-edge-size\";\nexport * from \"./e-shape-acceptor-edge-type\";\nexport * from \"./e-shape-acceptor-edge\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability-container-impl\";\nexport * from \"./e-shape-capability-container\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-bodies\";\nexport * from \"./e-shape-connector-body-impl\";\nexport * from \"./e-shape-connector-body\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-impl\";\nexport * from \"./e-shape-data-mapper-impl\";\nexport * from \"./e-shape-data-mapper\";\nexport * from \"./e-shape-data-mapping-impl\";\nexport * from \"./e-shape-data-mapping\";\nexport * from \"./e-shape-data-scoped-impl\";\nexport * from \"./e-shape-data-scoped\";\nexport * from \"./e-shape-data-system-impl\";\nexport * from \"./e-shape-data-system\";\nexport * from \"./e-shape-data-value-extension\";\nexport * from \"./e-shape-data-value-extensions\";\nexport * from \"./e-shape-data-value-formatter\";\nexport * from \"./e-shape-data-value-impl\";\nexport * from \"./e-shape-data-value-order\";\nexport * from \"./e-shape-data-value-range-impl\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value-scope\";\nexport * from \"./e-shape-data-value-state\";\nexport * from \"./e-shape-data-value-type\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-formatter-datum\";\nexport * from \"./e-shape-points-formatters\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization-mode\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime-impl\";\nexport * from \"./e-shape-runtime-reset\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,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;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-edge-normal\";\nexport * from \"./e-shape-acceptor-edge-side\";\nexport * from \"./e-shape-acceptor-edge-size\";\nexport * from \"./e-shape-acceptor-edge-type\";\nexport * from \"./e-shape-acceptor-edge\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability-container-impl\";\nexport * from \"./e-shape-capability-container\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-bodies\";\nexport * from \"./e-shape-connector-body-impl\";\nexport * from \"./e-shape-connector-body\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-impl\";\nexport * from \"./e-shape-data-mapper-impl\";\nexport * from \"./e-shape-data-mapper\";\nexport * from \"./e-shape-data-mapping-impl\";\nexport * from \"./e-shape-data-mapping\";\nexport * from \"./e-shape-data-scoped-impl\";\nexport * from \"./e-shape-data-scoped\";\nexport * from \"./e-shape-data-system-impl\";\nexport * from \"./e-shape-data-system\";\nexport * from \"./e-shape-data-value-extension\";\nexport * from \"./e-shape-data-value-extensions\";\nexport * from \"./e-shape-data-value-formatter\";\nexport * from \"./e-shape-data-value-impl\";\nexport * from \"./e-shape-data-value-order\";\nexport * from \"./e-shape-data-value-range-impl\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value-scope\";\nexport * from \"./e-shape-data-value-state\";\nexport * from \"./e-shape-data-value-type\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-image-like\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-formatter-datum\";\nexport * from \"./e-shape-points-formatters\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization-mode\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime-impl\";\nexport * from \"./e-shape-runtime-reset\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
|
@@ -7,9 +7,9 @@ import { EShapeImageSdf } from "./e-shape-image-sdf";
|
|
|
7
7
|
import { toImageElement } from "./to-image-element";
|
|
8
8
|
export var createImageSdf = function (dataUrl, convertToSdf) {
|
|
9
9
|
if (convertToSdf) {
|
|
10
|
-
return toImageElement(dataUrl).then(function (
|
|
10
|
+
return toImageElement(dataUrl).then(function (image) {
|
|
11
11
|
var generator = DynamicSDFFontGenerator.getInstance().init();
|
|
12
|
-
generator.updateTexture(
|
|
12
|
+
generator.updateTexture(image.width, image.height, image.source);
|
|
13
13
|
generator.render();
|
|
14
14
|
var canvas = document.createElement("canvas");
|
|
15
15
|
generator.read(canvas);
|
|
@@ -17,8 +17,8 @@ export var createImageSdf = function (dataUrl, convertToSdf) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
|
-
return toImageElement(dataUrl).then(function (
|
|
21
|
-
return new EShapeImageSdf(
|
|
20
|
+
return toImageElement(dataUrl).then(function (image) {
|
|
21
|
+
return new EShapeImageSdf(image);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-image-sdf.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/create-image-sdf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,OAAe,EAAE,YAAqB;IACpE,IAAI,YAAY,EAAE;QACjB,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"create-image-sdf.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/create-image-sdf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,OAAe,EAAE,YAAqB;IACpE,IAAI,YAAY,EAAE;QACjB,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,KAAK;YACzC,IAAM,SAAS,GAAG,uBAAuB,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;YAC/D,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YACjE,SAAS,CAAC,MAAM,EAAE,CAAC;YAEnB,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAEvB,OAAO,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;KACH;SAAM;QACN,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,KAAK;YACzC,OAAO,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;KACH;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DynamicSDFFontGenerator } from \"../../util/dynamic-sdf-font-generator\";\nimport { EShapeImageSdf } from \"./e-shape-image-sdf\";\nimport { toImageElement } from \"./to-image-element\";\n\nexport const createImageSdf = (dataUrl: string, convertToSdf: boolean): Promise<EShapeImageSdf> => {\n\tif (convertToSdf) {\n\t\treturn toImageElement(dataUrl).then((image): Promise<EShapeImageSdf> => {\n\t\t\tconst generator = DynamicSDFFontGenerator.getInstance().init();\n\t\t\tgenerator.updateTexture(image.width, image.height, image.source);\n\t\t\tgenerator.render();\n\n\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\tgenerator.read(canvas);\n\n\t\t\treturn createImageSdf(canvas.toDataURL(), false);\n\t\t});\n\t} else {\n\t\treturn toImageElement(dataUrl).then((image): EShapeImageSdf => {\n\t\t\treturn new EShapeImageSdf(image);\n\t\t});\n\t}\n};\n"]}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { EShapeImage } from "./e-shape-image";
|
|
6
6
|
import { toImageElement } from "./to-image-element";
|
|
7
7
|
export var createImage = function (dataUrl) {
|
|
8
|
-
return toImageElement(dataUrl).then(function (
|
|
9
|
-
return new EShapeImage(
|
|
8
|
+
return toImageElement(dataUrl).then(function (image) {
|
|
9
|
+
return new EShapeImage(image);
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=create-image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-image.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/create-image.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,OAAe;IAC1C,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,
|
|
1
|
+
{"version":3,"file":"create-image.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/create-image.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,OAAe;IAC1C,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,KAAK;QACzC,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeImage } from \"./e-shape-image\";\nimport { toImageElement } from \"./to-image-element\";\n\nexport const createImage = (dataUrl: string): Promise<EShapeImage> => {\n\treturn toImageElement(dataUrl).then((image): EShapeImage => {\n\t\treturn new EShapeImage(image);\n\t});\n};\n"]}
|
|
@@ -13,7 +13,6 @@ import { EShapeStrokeStyle } from "../e-shape-stroke-style";
|
|
|
13
13
|
import { EShapeTransformImpl } from "../e-shape-transform";
|
|
14
14
|
import { EShapeBaseHitTestData } from "./e-shape-base-hit-test-data";
|
|
15
15
|
import { hitTestBBox } from "./hit-test-bbox";
|
|
16
|
-
import { toGradientSerialized } from "./to-gradient-serialized";
|
|
17
16
|
import { EShapeCapabilityContainerImpl } from "../e-shape-capability-container-impl";
|
|
18
17
|
import { EShapeCapability } from "../e-shape-capability";
|
|
19
18
|
import { EShapeLock } from "./e-shape-lock";
|
|
@@ -170,16 +169,6 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
};
|
|
173
|
-
Object.defineProperty(EShapeBase.prototype, "image", {
|
|
174
|
-
get: function () {
|
|
175
|
-
return this._image;
|
|
176
|
-
},
|
|
177
|
-
set: function (image) {
|
|
178
|
-
this._image = image;
|
|
179
|
-
},
|
|
180
|
-
enumerable: false,
|
|
181
|
-
configurable: true
|
|
182
|
-
});
|
|
183
172
|
Object.defineProperty(EShapeBase.prototype, "points", {
|
|
184
173
|
get: function () {
|
|
185
174
|
return this._points;
|
|
@@ -328,20 +317,6 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
328
317
|
}
|
|
329
318
|
return childrenSerialized;
|
|
330
319
|
};
|
|
331
|
-
EShapeBase.prototype.serializeImage = function (manager) {
|
|
332
|
-
var image = this._image;
|
|
333
|
-
return image != null ? manager.addResource(image.src) : -1;
|
|
334
|
-
};
|
|
335
|
-
EShapeBase.prototype.serializeGradient = function (manager) {
|
|
336
|
-
var gradient = this.gradient;
|
|
337
|
-
if (gradient != null) {
|
|
338
|
-
if (gradient.serialized == null) {
|
|
339
|
-
gradient.serialized = toGradientSerialized(gradient);
|
|
340
|
-
}
|
|
341
|
-
return manager.addResource(gradient.serialized);
|
|
342
|
-
}
|
|
343
|
-
return -1;
|
|
344
|
-
};
|
|
345
320
|
EShapeBase.prototype.serializeState = function (manager) {
|
|
346
321
|
var state = this.state;
|
|
347
322
|
return (this.interactive ? 1 : 0) | (state.isFocusable ? 0 : 2) | (state.isActive ? 4 : 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAIN,KAAK,EACL,SAAS,EAGT,SAAS,EACT,KAAK,EACL,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGxD,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAUtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAEpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,OAAO,EAAmB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAA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C,IAAI,MAAM,YAAY,UAAU,EAAE;gBACjC,IAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC;gBAC1C,IAAI,eAAe,EAAE;oBACpB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;iBACrC;qBAAM;oBACN,IAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;oBAClC,IAAI,SAAS,EAAE;wBACd,SAAS,CAAC,KAAK,EAAE,CAAC;qBAClB;iBACD;aACD;iBAAM;gBACN,IAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;gBAClC,IAAI,SAAS,EAAE;oBACd,SAAS,CAAC,KAAK,EAAE,CAAC;iBAClB;aACD;SACD;QACD,IAAI,IAAI,GAAG,cAAc,CAAC,UAAU,EAAE;YACrC,IAAM,gBAAgB,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC;YAChD,IAAI,gBAAgB,IAAI,IAAI,EAAE;gBAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACvC;iBAAM;gBACN,IAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;gBACpC,IAAI,UAAU,IAAI,IAAI,EAAE;oBACvB,UAAU,CAAC,KAAK,EAAE,CAAC;iBACnB;aACD;SACD;QACD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACb,CAAC;IACF,iBAAC;AAAD,CAAC,AAn5BD,CAAyC,KAAK,CAAC,YAAY,GAm5B1D","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n\tDisplayObject,\n\tIPoint,\n\tMatrix,\n\tPoint,\n\tRectangle,\n\tRenderer,\n\tTexture,\n\tTransform,\n\tutils\n} from \"pixi.js\";\nimport { DApplications } from \"../../d-applications\";\nimport { DBaseStateSet } from \"../../d-base-state-set\";\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeAction } from \"../action/e-shape-action\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeConnectorContainer } from \"../e-shape-connector-container\";\nimport { EShapeConnectorContainerImpl } from \"../e-shape-connector-container-impl\";\nimport { EShapeContainer } from \"../e-shape-container\";\nimport { EShapeCopyPart } from \"../e-shape-copy-part\";\nimport { EShapeCorner } from \"../e-shape-corner\";\nimport { EShapeEditor } from \"../e-shape-editor\";\nimport { EShapeFill } from \"../e-shape-fill\";\nimport { EShapeGradientLike } from \"../e-shape-gradient\";\nimport { EShapeLayout } from \"../e-shape-layout\";\nimport { EShapePoints } from \"../e-shape-points\";\nimport { EShapeResourceManagerSerialization } from \"../e-shape-resource-manager-serialization\";\nimport { EShapeRuntime } from \"../e-shape-runtime\";\nimport { EShapeStateSet } from \"../e-shape-state-set\";\nimport { EShapeStateSetImplObservable } from \"../e-shape-state-set-impl-observable\";\nimport { EShapeStroke } from \"../e-shape-stroke\";\nimport { EShapeStrokeStyle } from \"../e-shape-stroke-style\";\nimport { EShapeData } from \"../e-shape-data\";\nimport { EShapeText } from \"../e-shape-text\";\nimport { EShapeTransform, EShapeTransformImpl } from \"../e-shape-transform\";\nimport { EShapeType } from \"../e-shape-type\";\nimport { EShapeUploaded } from \"../e-shape-uploaded\";\nimport { EShapeBaseHitTestData } from \"./e-shape-base-hit-test-data\";\nimport { hitTestBBox } from \"./hit-test-bbox\";\nimport { toGradientSerialized } from \"./to-gradient-serialized\";\nimport { EShapeCapabilityContainer } from \"../e-shape-capability-container\";\nimport { EShapeCapabilityContainerImpl } from \"../e-shape-capability-container-impl\";\nimport { EShapeCapability } from \"../e-shape-capability\";\nimport { EShapeLock } from \"./e-shape-lock\";\nimport { EShapeLockPart } from \"./e-shape-lock-part\";\n\nexport abstract class EShapeBase extends utils.EventEmitter implements EShape {\n\tprotected static WORK_HIT_TEST_DATA?: EShapeBaseHitTestData;\n\tid: string;\n\tuuid: number;\n\treadonly type: EShapeType;\n\tabstract readonly size: IPoint;\n\tabstract readonly fill: EShapeFill;\n\tabstract readonly stroke: EShapeStroke;\n\treadonly transform: EShapeTransform;\n\tabstract radius: number;\n\tabstract corner: EShapeCorner;\n\tprotected _points?: EShapePoints;\n\tprotected _image?: HTMLImageElement;\n\timageSrc?: string;\n\ttexture?: Texture;\n\tabstract gradient?: EShapeGradientLike;\n\tabstract readonly text: EShapeText;\n\t/** @deprecated in favor of {@link data} */\n\tabstract readonly tag: EShapeData;\n\tabstract readonly data: EShapeData;\n\treadonly action: EShapeAction;\n\tcursor?: string;\n\tinteractive: boolean;\n\tshortcut?: string;\n\ttitle?: string;\n\n\tprotected _connector?: EShapeConnectorContainer;\n\n\tprotected _visible: boolean;\n\n\tprotected _lockTransformChild: EShapeLock;\n\tprotected _lockTransformThis: EShapeLock;\n\tprotected _lockTransformParent: EShapeLock;\n\tprotected _lockUploaded: EShapeLock;\n\n\tprotected _bounds?: Rectangle;\n\tprotected _boundsTransformId: number;\n\tprotected _boundsInternal?: Rectangle;\n\tprotected _boundsInternalTransformId: number;\n\tprotected _boundsLocal?: Rectangle;\n\tprotected _boundsLocalTransformId: number;\n\n\tprotected _state?: EShapeStateSet;\n\tprotected _capability?: EShapeCapabilityContainer;\n\n\t// Hierarchy\n\tparent: EShapeContainer | EShape | null;\n\tchildren: EShape[];\n\tlayout?: EShapeLayout;\n\n\t// Working space\n\tindex: number; // A work space for sorting.\n\tselected: boolean;\n\treference: number; // Count of references from commands\n\n\t// Working space for the viewer\n\truntime?: EShapeRuntime;\n\n\t// Working space for the editor\n\teditor?: EShapeEditor;\n\n\t// Working space for the renderer\n\tuploaded?: EShapeUploaded;\n\n\tconstructor(type: EShapeType) {\n\t\tsuper();\n\t\tthis.id = \"\";\n\t\tthis.uuid = 0;\n\t\tthis.type = type;\n\t\tthis.transform = this.newTransform();\n\t\tthis.action = new EShapeAction();\n\t\tthis._visible = true;\n\n\t\tthis._lockTransformChild = new EShapeLock();\n\t\tthis._lockTransformThis = new EShapeLock();\n\t\tthis._lockTransformParent = new EShapeLock();\n\t\tthis._lockUploaded = new EShapeLock();\n\n\t\tthis._boundsTransformId = -1;\n\t\tthis._boundsInternalTransformId = -1;\n\t\tthis._boundsLocalTransformId = -1;\n\n\t\tthis.interactive = false;\n\n\t\t//\n\t\tthis.parent = null;\n\t\tthis.children = [];\n\n\t\t//\n\t\tthis.selected = false;\n\t\tthis.index = 0;\n\t\tthis.reference = 0;\n\t}\n\n\tprotected newTransform(): EShapeTransform {\n\t\treturn new EShapeTransformImpl(this);\n\t}\n\n\tonSizeChange(): void {\n\t\tthis._boundsTransformId = -1;\n\t\tthis._boundsInternalTransformId = -1;\n\t\tthis._boundsLocalTransformId = -1;\n\n\t\tif (!this._lockTransformChild.isLocked()) {\n\t\t\tthis.callChildTransformChange();\n\t\t}\n\t\tconst points = this._points;\n\t\tif (points != null) {\n\t\t\tpoints.onSizeChange();\n\t\t}\n\t\tthis.updateUploaded();\n\n\t\tconst connector = this._connector;\n\t\tif (connector != null) {\n\t\t\tconnector.fit(true);\n\t\t}\n\n\t\tconst runtime = this.runtime;\n\t\tif (runtime != null) {\n\t\t\truntime.onResize(this);\n\t\t}\n\t}\n\n\tonTransformChange(): void {\n\t\tif (!this._lockTransformChild.isLocked()) {\n\t\t\tthis.callChildTransformChange();\n\t\t}\n\t\tif (!this._lockTransformThis.isLocked()) {\n\t\t\tthis.onThisTransformChange();\n\t\t}\n\t\tif (!this._lockTransformParent.isLocked()) {\n\t\t\tthis.callParentTransformChange();\n\t\t}\n\t}\n\n\tprotected callChildTransformChange(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent != null) {\n\t\t\tparent.onChildTransformChange();\n\t\t}\n\t}\n\n\tprotected onThisTransformChange(): void {\n\t\tthis.updateUploaded();\n\t\tconst connector = this._connector;\n\t\tif (connector != null) {\n\t\t\tconnector.fit(true);\n\t\t}\n\t}\n\n\tprotected callParentTransformChange(): void {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].onParentTransformChange();\n\t\t}\n\t}\n\n\tonParentTransformChange(): void {\n\t\tif (!this._lockTransformThis.isLocked()) {\n\t\t\tthis.onThisTransformChange();\n\t\t}\n\t\tif (!this._lockTransformParent.isLocked()) {\n\t\t\tthis.callParentTransformChange();\n\t\t}\n\t}\n\n\tlock(part: EShapeLockPart): this {\n\t\tif (part & EShapeLockPart.UPLOADED) {\n\t\t\tthis._lockUploaded.lock();\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_PARENT) {\n\t\t\tthis._lockTransformParent.lock();\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_THIS) {\n\t\t\tthis._lockTransformThis.lock();\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_CHILD) {\n\t\t\tthis._lockTransformChild.lock();\n\t\t}\n\t\treturn this;\n\t}\n\n\tunlock(part: EShapeLockPart, invoke: boolean): this {\n\t\tif (part & EShapeLockPart.TRANSFORM_CHILD) {\n\t\t\tif (this._lockTransformChild.unlock() && invoke) {\n\t\t\t\tconst parent = this.parent;\n\t\t\t\tif (parent != null) {\n\t\t\t\t\tparent.onChildTransformChange();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_THIS) {\n\t\t\tif (this._lockTransformThis.unlock() && invoke) {\n\t\t\t\tthis.onThisTransformChange();\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_PARENT) {\n\t\t\tif (this._lockTransformParent.unlock() && invoke) {\n\t\t\t\tconst children = this.children;\n\t\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\t\tchildren[i].onParentTransformChange();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeLockPart.UPLOADED) {\n\t\t\tconst lockUploaded = this._lockUploaded;\n\t\t\tif (lockUploaded.unlock() && invoke) {\n\t\t\t\tthis.updateUploaded(lockUploaded.isHigh());\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tonChildTransformChange(): void {\n\t\t//\n\t}\n\n\tupdateUploaded(recursively?: boolean): void {\n\t\tif (this._lockUploaded.isLocked(recursively)) {\n\t\t\treturn;\n\t\t}\n\t\tconst uploaded = this.uploaded;\n\t\tif (uploaded != null) {\n\t\t\tuploaded.update(this);\n\t\t}\n\t\tif (recursively === true) {\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tchildren[i].updateUploaded(true);\n\t\t\t}\n\t\t}\n\t}\n\n\tget image(): HTMLImageElement | undefined {\n\t\treturn this._image;\n\t}\n\n\tset image(image: HTMLImageElement | undefined) {\n\t\tthis._image = image;\n\t}\n\n\tget points(): EShapePoints | undefined {\n\t\treturn this._points;\n\t}\n\n\tget root(): EShape {\n\t\tlet root: EShape = this;\n\t\twhile (root.parent instanceof EShapeBase) {\n\t\t\troot = root.parent;\n\t\t}\n\t\treturn root;\n\t}\n\n\tget connector(): EShapeConnectorContainer {\n\t\tlet result = this._connector;\n\t\tif (result == null) {\n\t\t\tresult = new EShapeConnectorContainerImpl(this);\n\t\t\tthis._connector = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tget visible(): boolean {\n\t\tif (this._visible) {\n\t\t\tconst parent = this.parent;\n\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\treturn parent.visible;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tset visible(visible: boolean) {\n\t\tif (this._visible !== visible) {\n\t\t\tthis._visible = visible;\n\t\t\tthis.updateUploaded(true);\n\t\t}\n\t}\n\n\tget worldVisible(): boolean {\n\t\tif (this._visible) {\n\t\t\tconst parent = this.parent;\n\t\t\tif (parent) {\n\t\t\t\treturn parent.worldVisible;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t//\n\tabstract clone(): EShape;\n\n\t//\n\ttoDirty(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent != null) {\n\t\t\tparent.toDirty();\n\t\t}\n\t}\n\n\t// Hierarchy\n\tattach(parent: EShapeContainer | EShape, at?: number): this {\n\t\tthis.detach();\n\t\tthis.parent = parent;\n\t\tconst children = parent.children;\n\t\tif (at != null && 0 <= at && at < children.length) {\n\t\t\tchildren.splice(at, 0, this);\n\t\t} else {\n\t\t\tchildren.push(this);\n\t\t}\n\t\tparent.onChildTransformChange();\n\t\tparent.toDirty();\n\t\tthis.onAttach();\n\t\treturn this;\n\t}\n\n\tonAttach(): void {\n\t\tthis.uploaded = undefined;\n\t\tconst connector = this._connector;\n\t\tif (connector) {\n\t\t\tconnector.attach();\n\t\t\tconnector.fit(true);\n\t\t}\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].onAttach();\n\t\t}\n\t}\n\n\tdetach(exceptions?: Set<EShape>): this {\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tthis.parent = null;\n\t\t\tconst children = parent.children;\n\t\t\tconst index = children.indexOf(this);\n\t\t\tif (0 <= index) {\n\t\t\t\tchildren.splice(index, 1);\n\t\t\t\tparent.onChildTransformChange();\n\t\t\t\tparent.toDirty();\n\t\t\t\tthis.onDetach(exceptions);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tonDetach(exceptions?: Set<EShape>): void {\n\t\tthis.uploaded = undefined;\n\t\tconst connector = this._connector;\n\t\tif (connector) {\n\t\t\tconnector.detach(exceptions);\n\t\t}\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].onDetach(exceptions);\n\t\t}\n\t}\n\n\t// Transform\n\tupdateTransform(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tif (parent.parent) {\n\t\t\t\tparent.updateTransform();\n\t\t\t}\n\t\t\tthis.transform.updateTransform(parent.transform);\n\t\t} else {\n\t\t\tthis.transform.updateTransform(Transform.IDENTITY);\n\t\t}\n\t}\n\n\t// Serialization\n\tserializeChildren(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem[] {\n\t\tconst children = this.children;\n\t\tconst childrenSerialized = [];\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tchildrenSerialized.push(child.serialize(manager));\n\t\t}\n\t\treturn childrenSerialized;\n\t}\n\n\tserializeImage(manager: EShapeResourceManagerSerialization): number {\n\t\tconst image = this._image;\n\t\treturn image != null ? manager.addResource(image.src) : -1;\n\t}\n\n\tserializeGradient(manager: EShapeResourceManagerSerialization): number {\n\t\tconst gradient = this.gradient;\n\t\tif (gradient != null) {\n\t\t\tif (gradient.serialized == null) {\n\t\t\t\tgradient.serialized = toGradientSerialized(gradient);\n\t\t\t}\n\t\t\treturn manager.addResource(gradient.serialized);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tserializeState(manager: EShapeResourceManagerSerialization): number {\n\t\tconst state = this.state;\n\t\treturn (this.interactive ? 1 : 0) | (state.isFocusable ? 0 : 2) | (state.isActive ? 4 : 0);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem {\n\t\tconst transform = this.transform;\n\t\tconst position = transform.position;\n\t\tconst pivot = transform.pivot;\n\t\tconst size = this.size;\n\t\tconst shortcut = this.shortcut;\n\t\tconst shortcutId = shortcut != null ? manager.addResource(shortcut) : -1;\n\t\tconst cursor = this.cursor;\n\t\tconst cursorId = cursor != null ? manager.addResource(cursor) : -1;\n\t\tconst title = this.title;\n\t\tconst titleId = title != null ? manager.addResource(title) : -1;\n\t\tlet capabilitiesAdded: EShapeCapability = EShapeCapability.NONE;\n\t\tlet capabilitiesRemoved: EShapeCapability = EShapeCapability.NONE;\n\t\tlet capabilitiesLocked: EShapeCapability = EShapeCapability.NONE;\n\t\tconst capability = this._capability;\n\t\tif (capability != null) {\n\t\t\tcapabilitiesAdded = capability.added;\n\t\t\tcapabilitiesRemoved = capability.removed;\n\t\t\tcapabilitiesLocked = capability.locked;\n\t\t}\n\t\treturn [\n\t\t\tthis.type,\n\t\t\tmanager.addResource(this.id),\n\t\t\tposition.x,\n\t\t\tposition.y,\n\t\t\tsize.x,\n\t\t\tsize.y,\n\t\t\ttransform.rotation,\n\t\t\ttransform.skew.x,\n\t\t\tthis.fill.serialize(manager),\n\t\t\tthis.stroke.serialize(manager),\n\t\t\tcursorId,\n\t\t\tthis.text.serialize(manager),\n\t\t\tthis.data.serialize(manager),\n\t\t\tthis.radius,\n\t\t\tthis.corner,\n\t\t\t-1,\n\t\t\t-1,\n\t\t\tthis.action.serialize(manager),\n\t\t\tthis.serializeImage(manager),\n\t\t\tthis.serializeGradient(manager),\n\t\t\tthis.serializeChildren(manager),\n\t\t\tpivot.x,\n\t\t\tpivot.y,\n\t\t\tthis.serializeState(manager),\n\t\t\tshortcutId,\n\t\t\ttitleId,\n\t\t\tthis.uuid,\n\t\t\tcapabilitiesAdded,\n\t\t\tcapabilitiesRemoved,\n\t\t\tcapabilitiesLocked\n\t\t];\n\t}\n\n\taddUuid(manager: EShapeResourceManagerSerialization): void {\n\t\tthis.uuid = manager.addUuid(this.uuid);\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].addUuid(manager);\n\t\t}\n\t}\n\n\tupdateUuid(manager: EShapeResourceManagerSerialization): void {\n\t\tthis.uuid = manager.updateUuid(this.uuid);\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].updateUuid(manager);\n\t\t}\n\t}\n\n\t// Hit test\n\tprotected getShapeScale(): number {\n\t\tconst container = this.root.parent as any;\n\t\tif (container != null && container.getShapeScale != null) {\n\t\t\treturn container.getShapeScale();\n\t\t}\n\t\treturn 1.0;\n\t}\n\n\tprotected getStrokeWidthScale(style: EShapeStrokeStyle): number {\n\t\tif (style & EShapeStrokeStyle.NON_EXPANDING_WIDTH) {\n\t\t\tif (style & EShapeStrokeStyle.NON_SHRINKING_WIDTH) {\n\t\t\t\treturn this.getShapeScale();\n\t\t\t} else {\n\t\t\t\treturn Math.min(1.0, this.getShapeScale());\n\t\t\t}\n\t\t} else {\n\t\t\tif (style & EShapeStrokeStyle.NON_SHRINKING_WIDTH) {\n\t\t\t\treturn Math.max(1.0, this.getShapeScale());\n\t\t\t} else {\n\t\t\t\treturn 1.0;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected getHitTestSize(result: EShapeBaseHitTestData): EShapeBaseHitTestData {\n\t\tconst size = this.size;\n\t\tresult.width = 0.5 * size.x;\n\t\tresult.height = 0.5 * size.y;\n\t\treturn result;\n\t}\n\n\ttoHitTestData(x: number, y: number): EShapeBaseHitTestData {\n\t\tconst result = this.getHitTestSize(\n\t\t\t(EShapeBase.WORK_HIT_TEST_DATA ??= new EShapeBaseHitTestData())\n\t\t);\n\t\tconst sx = result.width;\n\t\tconst sy = result.height;\n\t\tconst pivot = this.transform.pivot;\n\t\tconst dx = x - pivot.x;\n\t\tconst dy = y - pivot.y;\n\t\tconst stroke = this.stroke;\n\t\tconst strokeWidth = stroke.enable ? stroke.width : 0;\n\t\tconst strokeScale = this.getStrokeWidthScale(stroke.style);\n\t\tconst strokeAlign = stroke.align;\n\t\tconst s = strokeWidth * strokeScale * strokeAlign;\n\t\treturn result.set(\n\t\t\t0 <= sx ? +dx : -dx,\n\t\t\t0 <= sy ? +dy : -dy,\n\t\t\tMath.abs(sx) + s,\n\t\t\tMath.abs(sy) + s,\n\t\t\tstrokeWidth,\n\t\t\tstrokeScale,\n\t\t\tstrokeAlign\n\t\t);\n\t}\n\n\tcontains(x: number, y: number): EShape | null {\n\t\tconst data = this.toHitTestData(x, y);\n\t\tif (\n\t\t\tthis.containsAbs(\n\t\t\t\tdata.x,\n\t\t\t\tdata.y,\n\t\t\t\tdata.width,\n\t\t\t\tdata.height,\n\t\t\t\tdata.strokeWidth,\n\t\t\t\tdata.strokeScale,\n\t\t\t\tdata.strokeAlign\n\t\t\t)\n\t\t) {\n\t\t\treturn this;\n\t\t}\n\t\treturn this.containsText(x, y) || this.containsChildren(x, y);\n\t}\n\n\tprotected containsText(x: number, y: number): EShape | null {\n\t\tconst text = this.text;\n\t\tconst textAtlas = text.atlas;\n\t\tif (textAtlas != null) {\n\t\t\tconst textWorld = text.world;\n\t\t\tif (textWorld != null) {\n\t\t\t\tconst transform = this.transform.internalTransform;\n\t\t\t\tconst tx = transform.a * x + transform.c * y + transform.tx - textWorld[0];\n\t\t\t\tconst ty = transform.b * x + transform.d * y + transform.ty - textWorld[1];\n\t\t\t\tconst th = textWorld[2] * tx + textWorld[3] * ty;\n\t\t\t\tconst tv = textWorld[4] * tx + textWorld[5] * ty;\n\t\t\t\tconst w = textWorld[6];\n\t\t\t\tconst h = textWorld[7];\n\t\t\t\tif (0 <= th && th <= w && 0 <= tv && tv <= h) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected containsChildren(x: number, y: number): EShape | null {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tconst child = children[i];\n\t\t\tchild.updateTransform();\n\t\t\tconst localTransform = child.transform.localTransform;\n\t\t\tconst a = localTransform.a;\n\t\t\tconst b = localTransform.b;\n\t\t\tconst c = localTransform.c;\n\t\t\tconst d = localTransform.d;\n\t\t\tconst tx = localTransform.tx;\n\t\t\tconst ty = localTransform.ty;\n\t\t\tconst id = 1 / (a * d - c * b);\n\t\t\tconst lx = (d * x - c * y + ty * c - tx * d) * id;\n\t\t\tconst ly = (a * y - b * x - ty * a + tx * b) * id;\n\t\t\tconst childResult = child.contains(lx, ly);\n\t\t\tif (childResult != null) {\n\t\t\t\treturn childResult;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tcontainsBBox(x: number, y: number): boolean {\n\t\tconst data = this.toHitTestData(x, y);\n\t\treturn this.containsAbsBBox(data.x, data.y, data.width, data.height);\n\t}\n\n\tcontainsAbs(\n\t\tx: number,\n\t\ty: number,\n\t\tax: number,\n\t\tay: number,\n\t\tsw: number,\n\t\tss: number,\n\t\tsa: number\n\t): boolean {\n\t\treturn this.containsAbsBBox(x, y, ax, ay);\n\t}\n\n\tcontainsAbsBBox(x: number, y: number, ax: number, ay: number): boolean {\n\t\treturn hitTestBBox(x, y, ax, ay);\n\t}\n\n\tselect(point: Point): boolean {\n\t\treturn false;\n\t}\n\n\t//\n\ttoGlobal(position: IPoint, result: Point, skipUpdate?: boolean): Point {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tresult.copyFrom(position);\n\t\tthis.transform.worldTransform.apply(result, result);\n\t\treturn result;\n\t}\n\n\ttoLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tif (result === undefined) {\n\t\t\tresult = new Point();\n\t\t}\n\t\tresult.copyFrom(position);\n\t\tthis.transform.worldTransform.applyInverse(result, result);\n\t\treturn result;\n\t}\n\n\tgetBounds(skipUpdate?: boolean, result?: Rectangle): Rectangle {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tconst bounds = this._bounds || new Rectangle();\n\t\tthis._bounds = bounds;\n\t\tconst worldId = this.transform.getWorldId();\n\t\tif (worldId !== this._boundsTransformId) {\n\t\t\tthis._boundsTransformId = worldId;\n\t\t\tthis.getBounds_(this.transform.worldTransform, bounds);\n\t\t}\n\t\tresult ??= new Rectangle();\n\t\tresult.copyFrom(bounds);\n\t\treturn result;\n\t}\n\n\tgetBoundsInternal(skipUpdate?: boolean, result?: Rectangle): Rectangle {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tconst boundsInternal = this._boundsInternal || new Rectangle();\n\t\tthis._boundsInternal = boundsInternal;\n\t\tconst currentLocalId = this.transform.getLocalIdCurrent();\n\t\tif (currentLocalId !== this._boundsInternalTransformId) {\n\t\t\tthis._boundsInternalTransformId = currentLocalId;\n\t\t\tthis.getBounds_(this.transform.internalTransform, boundsInternal);\n\t\t}\n\t\tresult ??= new Rectangle();\n\t\tresult.copyFrom(boundsInternal);\n\t\treturn result;\n\t}\n\n\tgetBoundsLocal(skipUpdate?: boolean, result?: Rectangle): Rectangle {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tconst boundsLocal = this._boundsLocal || new Rectangle();\n\t\tthis._boundsLocal = boundsLocal;\n\t\tconst currentLocalId = this.transform.getLocalIdCurrent();\n\t\tif (currentLocalId !== this._boundsLocalTransformId) {\n\t\t\tthis._boundsLocalTransformId = currentLocalId;\n\t\t\tthis.getBounds_(this.transform.localTransform, boundsLocal);\n\t\t}\n\t\tresult ??= new Rectangle();\n\t\tresult.copyFrom(boundsLocal);\n\t\treturn result;\n\t}\n\n\tprotected getBoundsSize(): IPoint {\n\t\treturn this.size;\n\t}\n\n\tprotected getBounds_(transform: Matrix, result: Rectangle): Rectangle {\n\t\tconst pivot = this.transform.pivot;\n\t\tconst px = pivot.x;\n\t\tconst py = pivot.y;\n\t\tconst size = this.getBoundsSize();\n\t\tconst sx = 0.5 * size.x;\n\t\tconst sy = 0.5 * size.y;\n\n\t\tconst a = transform.a;\n\t\tconst b = transform.b;\n\t\tconst c = transform.c;\n\t\tconst d = transform.d;\n\n\t\tlet x = -sx + px;\n\t\tlet y = -sy + py;\n\t\tconst x0 = a * x + c * y;\n\t\tconst y0 = b * x + d * y;\n\n\t\tx = +sx + px;\n\t\ty = -sy + py;\n\t\tconst x1 = a * x + c * y;\n\t\tconst y1 = b * x + d * y;\n\n\t\tx = -sx + px;\n\t\ty = +sy + py;\n\t\tconst x2 = a * x + c * y;\n\t\tconst y2 = b * x + d * y;\n\n\t\tx = +sx + px;\n\t\ty = +sy + py;\n\t\tconst x3 = a * x + c * y;\n\t\tconst y3 = b * x + d * y;\n\n\t\tconst xmin = Math.min(x0, x1, x2, x3);\n\t\tconst ymin = Math.min(y0, y1, y2, y3);\n\t\tconst xmax = Math.max(x0, x1, x2, x3);\n\t\tconst ymax = Math.max(y0, y1, y2, y3);\n\t\tresult.x = xmin + transform.tx;\n\t\tresult.y = ymin + transform.ty;\n\t\tresult.width = xmax - xmin;\n\t\tresult.height = ymax - ymin;\n\t\treturn result;\n\t}\n\n\t//\n\tdestroy(): void {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tchildren[i].destroy();\n\t\t}\n\t\tchildren.length = 0;\n\t}\n\n\t//\n\tprotected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime != null) {\n\t\t\truntime.onStateChange(this, newState, oldState);\n\t\t}\n\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof EShapeBase) {\n\t\t\t\tchild.state.onParentChange(newState, oldState);\n\t\t\t}\n\t\t}\n\t}\n\n\tget state(): EShapeStateSet {\n\t\tlet result = this._state;\n\t\tif (result == null) {\n\t\t\tresult = new EShapeStateSetImplObservable((newState, oldState): void => {\n\t\t\t\tthis.onStateChange(newState, oldState);\n\t\t\t});\n\t\t\tthis._state = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tget capability(): EShapeCapabilityContainer {\n\t\tlet result = this._capability;\n\t\tif (result == null) {\n\t\t\tresult = new EShapeCapabilityContainerImpl();\n\t\t\tthis._capability = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tgetCapability(): EShapeCapabilityContainer | undefined {\n\t\treturn this._capability;\n\t}\n\n\tfocus(): this {\n\t\tthis.setFocused(true);\n\t\treturn this;\n\t}\n\n\tblur(): this {\n\t\tthis.setFocused(false);\n\t\treturn this;\n\t}\n\n\tprotected setFocused(isFocused: boolean): void {\n\t\tif (this.state.isFocused !== isFocused) {\n\t\t\tconst layer = DApplications.getLayer(this);\n\t\t\tif (layer) {\n\t\t\t\tlayer.getFocusController().set(this, isFocused);\n\t\t\t}\n\t\t}\n\t}\n\n\tonKeyDown(e: KeyboardEvent): boolean {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime) {\n\t\t\treturn runtime.onKeyDown(this, e);\n\t\t}\n\t\treturn false;\n\t}\n\n\tonKeyUp(e: KeyboardEvent): boolean {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime) {\n\t\t\treturn runtime.onKeyUp(this, e);\n\t\t}\n\t\treturn false;\n\t}\n\n\t//\n\tupdate(time: number): void {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime) {\n\t\t\truntime.update(this, time);\n\t\t}\n\t}\n\n\tonRender(time: number, renderer: Renderer): void {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime) {\n\t\t\truntime.onRender(this, time, renderer);\n\t\t}\n\t}\n\n\tcopy(source: EShape, part: EShapeCopyPart = EShapeCopyPart.ALL): this {\n\t\tthis.lock(EShapeLockPart.ALL);\n\t\tthis.id = source.id;\n\t\tthis.uuid = source.uuid;\n\t\tthis.visible = source.visible;\n\t\tif (part & EShapeCopyPart.TRANSFORM) {\n\t\t\tconst transform = this.transform;\n\t\t\tconst sourceTransform = source.transform;\n\t\t\ttransform.position.copyFrom(sourceTransform.position);\n\t\t\ttransform.rotation = sourceTransform.rotation;\n\t\t\ttransform.skew.copyFrom(sourceTransform.skew);\n\t\t\ttransform.pivot.copyFrom(sourceTransform.pivot);\n\t\t\ttransform.scale.copyFrom(sourceTransform.scale);\n\t\t}\n\t\tif (part & EShapeCopyPart.SIZE) {\n\t\t\tthis.size.copyFrom(source.size);\n\t\t}\n\t\tif (part & EShapeCopyPart.STYLE) {\n\t\t\tthis.fill.copy(source.fill);\n\t\t\tthis.stroke.copy(source.stroke);\n\t\t\tthis.text.copy(source.text);\n\t\t\tthis.radius = source.radius;\n\t\t\tthis.corner = source.corner;\n\t\t}\n\t\tif (part & EShapeCopyPart.DATA) {\n\t\t\tthis.data.copy(source.data);\n\t\t}\n\t\tif (part & EShapeCopyPart.IMAGE) {\n\t\t\tthis.image = source.image;\n\t\t}\n\t\tif (part & EShapeCopyPart.ACTION) {\n\t\t\tthis.action.clearAndAddAll(source.action.values);\n\t\t\tthis.interactive = source.interactive;\n\t\t\tthis.cursor = source.cursor;\n\t\t\tthis.shortcut = source.shortcut;\n\t\t}\n\t\tif (part & EShapeCopyPart.POINTS) {\n\t\t\tconst sourcePoints = source.points;\n\t\t\tif (sourcePoints != null) {\n\t\t\t\tconst points = this.points;\n\t\t\t\tif (points != null) {\n\t\t\t\t\tpoints.copy(sourcePoints);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeCopyPart.STATE) {\n\t\t\tthis.state.lock(false).copy(source.state).unlock();\n\t\t}\n\t\tif (part & EShapeCopyPart.CONNECTOR) {\n\t\t\tif (source instanceof EShapeBase) {\n\t\t\t\tconst sourceConnector = source._connector;\n\t\t\t\tif (sourceConnector) {\n\t\t\t\t\tthis.connector.copy(sourceConnector);\n\t\t\t\t} else {\n\t\t\t\t\tconst connector = this._connector;\n\t\t\t\t\tif (connector) {\n\t\t\t\t\t\tconnector.clear();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst connector = this._connector;\n\t\t\t\tif (connector) {\n\t\t\t\t\tconnector.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeCopyPart.CAPABILITY) {\n\t\t\tconst sourceCapability = source.getCapability();\n\t\t\tif (sourceCapability != null) {\n\t\t\t\tthis.capability.copy(sourceCapability);\n\t\t\t} else {\n\t\t\t\tconst capability = this._capability;\n\t\t\t\tif (capability != null) {\n\t\t\t\t\tcapability.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.unlock(EShapeLockPart.ALL, true);\n\t\treturn this;\n\t}\n}\n"]}
|
|
1
|
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AAG,cAAc,CAAC,SAAS,EAAE;YACpC,IAAI,MAAM,YAAY,UAAU,EAAE;gBACjC,IAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC;gBAC1C,IAAI,eAAe,EAAE;oBACpB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;iBACrC;qBAAM;oBACN,IAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;oBAClC,IAAI,SAAS,EAAE;wBACd,SAAS,CAAC,KAAK,EAAE,CAAC;qBAClB;iBACD;aACD;iBAAM;gBACN,IAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;gBAClC,IAAI,SAAS,EAAE;oBACd,SAAS,CAAC,KAAK,EAAE,CAAC;iBAClB;aACD;SACD;QACD,IAAI,IAAI,GAAG,cAAc,CAAC,UAAU,EAAE;YACrC,IAAM,gBAAgB,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC;YAChD,IAAI,gBAAgB,IAAI,IAAI,EAAE;gBAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACvC;iBAAM;gBACN,IAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;gBACpC,IAAI,UAAU,IAAI,IAAI,EAAE;oBACvB,UAAU,CAAC,KAAK,EAAE,CAAC;iBACnB;aACD;SACD;QACD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACb,CAAC;IACF,iBAAC;AAAD,CAAC,AA93BD,CAAyC,KAAK,CAAC,YAAY,GA83B1D","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n\tDisplayObject,\n\tIPoint,\n\tMatrix,\n\tPoint,\n\tRectangle,\n\tRenderer,\n\tTexture,\n\tTransform,\n\tutils\n} from \"pixi.js\";\nimport { DApplications } from \"../../d-applications\";\nimport { DBaseStateSet } from \"../../d-base-state-set\";\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeAction } from \"../action/e-shape-action\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeImageLike } from \"../e-shape-image-like\";\nimport { EShapeConnectorContainer } from \"../e-shape-connector-container\";\nimport { EShapeConnectorContainerImpl } from \"../e-shape-connector-container-impl\";\nimport { EShapeContainer } from \"../e-shape-container\";\nimport { EShapeCopyPart } from \"../e-shape-copy-part\";\nimport { EShapeCorner } from \"../e-shape-corner\";\nimport { EShapeEditor } from \"../e-shape-editor\";\nimport { EShapeFill } from \"../e-shape-fill\";\nimport { EShapeGradientLike } from \"../e-shape-gradient\";\nimport { EShapeLayout } from \"../e-shape-layout\";\nimport { EShapePoints } from \"../e-shape-points\";\nimport { EShapeResourceManagerSerialization } from \"../e-shape-resource-manager-serialization\";\nimport { EShapeRuntime } from \"../e-shape-runtime\";\nimport { EShapeStateSet } from \"../e-shape-state-set\";\nimport { EShapeStateSetImplObservable } from \"../e-shape-state-set-impl-observable\";\nimport { EShapeStroke } from \"../e-shape-stroke\";\nimport { EShapeStrokeStyle } from \"../e-shape-stroke-style\";\nimport { EShapeData } from \"../e-shape-data\";\nimport { EShapeText } from \"../e-shape-text\";\nimport { EShapeTransform, EShapeTransformImpl } from \"../e-shape-transform\";\nimport { EShapeType } from \"../e-shape-type\";\nimport { EShapeUploaded } from \"../e-shape-uploaded\";\nimport { EShapeBaseHitTestData } from \"./e-shape-base-hit-test-data\";\nimport { hitTestBBox } from \"./hit-test-bbox\";\nimport { EShapeCapabilityContainer } from \"../e-shape-capability-container\";\nimport { EShapeCapabilityContainerImpl } from \"../e-shape-capability-container-impl\";\nimport { EShapeCapability } from \"../e-shape-capability\";\nimport { EShapeLock } from \"./e-shape-lock\";\nimport { EShapeLockPart } from \"./e-shape-lock-part\";\n\nexport abstract class EShapeBase extends utils.EventEmitter implements EShape {\n\tprotected static WORK_HIT_TEST_DATA?: EShapeBaseHitTestData;\n\tid: string;\n\tuuid: number;\n\treadonly type: EShapeType;\n\tabstract readonly size: IPoint;\n\tabstract readonly fill: EShapeFill;\n\tabstract readonly stroke: EShapeStroke;\n\treadonly transform: EShapeTransform;\n\tabstract radius: number;\n\tabstract corner: EShapeCorner;\n\tprotected _points?: EShapePoints;\n\tabstract image?: EShapeImageLike;\n\ttexture?: Texture;\n\tabstract gradient?: EShapeGradientLike;\n\tabstract readonly text: EShapeText;\n\t/** @deprecated in favor of {@link data} */\n\tabstract readonly tag: EShapeData;\n\tabstract readonly data: EShapeData;\n\treadonly action: EShapeAction;\n\tcursor?: string;\n\tinteractive: boolean;\n\tshortcut?: string;\n\ttitle?: string;\n\n\tprotected _connector?: EShapeConnectorContainer;\n\n\tprotected _visible: boolean;\n\n\tprotected _lockTransformChild: EShapeLock;\n\tprotected _lockTransformThis: EShapeLock;\n\tprotected _lockTransformParent: EShapeLock;\n\tprotected _lockUploaded: EShapeLock;\n\n\tprotected _bounds?: Rectangle;\n\tprotected _boundsTransformId: number;\n\tprotected _boundsInternal?: Rectangle;\n\tprotected _boundsInternalTransformId: number;\n\tprotected _boundsLocal?: Rectangle;\n\tprotected _boundsLocalTransformId: number;\n\n\tprotected _state?: EShapeStateSet;\n\tprotected _capability?: EShapeCapabilityContainer;\n\n\t// Hierarchy\n\tparent: EShapeContainer | EShape | null;\n\tchildren: EShape[];\n\tlayout?: EShapeLayout;\n\n\t// Working space\n\tindex: number; // A work space for sorting.\n\tselected: boolean;\n\treference: number; // Count of references from commands\n\n\t// Working space for the viewer\n\truntime?: EShapeRuntime;\n\n\t// Working space for the editor\n\teditor?: EShapeEditor;\n\n\t// Working space for the renderer\n\tuploaded?: EShapeUploaded;\n\n\tconstructor(type: EShapeType) {\n\t\tsuper();\n\t\tthis.id = \"\";\n\t\tthis.uuid = 0;\n\t\tthis.type = type;\n\t\tthis.transform = this.newTransform();\n\t\tthis.action = new EShapeAction();\n\t\tthis._visible = true;\n\n\t\tthis._lockTransformChild = new EShapeLock();\n\t\tthis._lockTransformThis = new EShapeLock();\n\t\tthis._lockTransformParent = new EShapeLock();\n\t\tthis._lockUploaded = new EShapeLock();\n\n\t\tthis._boundsTransformId = -1;\n\t\tthis._boundsInternalTransformId = -1;\n\t\tthis._boundsLocalTransformId = -1;\n\n\t\tthis.interactive = false;\n\n\t\t//\n\t\tthis.parent = null;\n\t\tthis.children = [];\n\n\t\t//\n\t\tthis.selected = false;\n\t\tthis.index = 0;\n\t\tthis.reference = 0;\n\t}\n\n\tprotected newTransform(): EShapeTransform {\n\t\treturn new EShapeTransformImpl(this);\n\t}\n\n\tonSizeChange(): void {\n\t\tthis._boundsTransformId = -1;\n\t\tthis._boundsInternalTransformId = -1;\n\t\tthis._boundsLocalTransformId = -1;\n\n\t\tif (!this._lockTransformChild.isLocked()) {\n\t\t\tthis.callChildTransformChange();\n\t\t}\n\t\tconst points = this._points;\n\t\tif (points != null) {\n\t\t\tpoints.onSizeChange();\n\t\t}\n\t\tthis.updateUploaded();\n\n\t\tconst connector = this._connector;\n\t\tif (connector != null) {\n\t\t\tconnector.fit(true);\n\t\t}\n\n\t\tconst runtime = this.runtime;\n\t\tif (runtime != null) {\n\t\t\truntime.onResize(this);\n\t\t}\n\t}\n\n\tonTransformChange(): void {\n\t\tif (!this._lockTransformChild.isLocked()) {\n\t\t\tthis.callChildTransformChange();\n\t\t}\n\t\tif (!this._lockTransformThis.isLocked()) {\n\t\t\tthis.onThisTransformChange();\n\t\t}\n\t\tif (!this._lockTransformParent.isLocked()) {\n\t\t\tthis.callParentTransformChange();\n\t\t}\n\t}\n\n\tprotected callChildTransformChange(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent != null) {\n\t\t\tparent.onChildTransformChange();\n\t\t}\n\t}\n\n\tprotected onThisTransformChange(): void {\n\t\tthis.updateUploaded();\n\t\tconst connector = this._connector;\n\t\tif (connector != null) {\n\t\t\tconnector.fit(true);\n\t\t}\n\t}\n\n\tprotected callParentTransformChange(): void {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].onParentTransformChange();\n\t\t}\n\t}\n\n\tonParentTransformChange(): void {\n\t\tif (!this._lockTransformThis.isLocked()) {\n\t\t\tthis.onThisTransformChange();\n\t\t}\n\t\tif (!this._lockTransformParent.isLocked()) {\n\t\t\tthis.callParentTransformChange();\n\t\t}\n\t}\n\n\tlock(part: EShapeLockPart): this {\n\t\tif (part & EShapeLockPart.UPLOADED) {\n\t\t\tthis._lockUploaded.lock();\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_PARENT) {\n\t\t\tthis._lockTransformParent.lock();\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_THIS) {\n\t\t\tthis._lockTransformThis.lock();\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_CHILD) {\n\t\t\tthis._lockTransformChild.lock();\n\t\t}\n\t\treturn this;\n\t}\n\n\tunlock(part: EShapeLockPart, invoke: boolean): this {\n\t\tif (part & EShapeLockPart.TRANSFORM_CHILD) {\n\t\t\tif (this._lockTransformChild.unlock() && invoke) {\n\t\t\t\tconst parent = this.parent;\n\t\t\t\tif (parent != null) {\n\t\t\t\t\tparent.onChildTransformChange();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_THIS) {\n\t\t\tif (this._lockTransformThis.unlock() && invoke) {\n\t\t\t\tthis.onThisTransformChange();\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeLockPart.TRANSFORM_PARENT) {\n\t\t\tif (this._lockTransformParent.unlock() && invoke) {\n\t\t\t\tconst children = this.children;\n\t\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\t\tchildren[i].onParentTransformChange();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeLockPart.UPLOADED) {\n\t\t\tconst lockUploaded = this._lockUploaded;\n\t\t\tif (lockUploaded.unlock() && invoke) {\n\t\t\t\tthis.updateUploaded(lockUploaded.isHigh());\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tonChildTransformChange(): void {\n\t\t//\n\t}\n\n\tupdateUploaded(recursively?: boolean): void {\n\t\tif (this._lockUploaded.isLocked(recursively)) {\n\t\t\treturn;\n\t\t}\n\t\tconst uploaded = this.uploaded;\n\t\tif (uploaded != null) {\n\t\t\tuploaded.update(this);\n\t\t}\n\t\tif (recursively === true) {\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tchildren[i].updateUploaded(true);\n\t\t\t}\n\t\t}\n\t}\n\n\tget points(): EShapePoints | undefined {\n\t\treturn this._points;\n\t}\n\n\tget root(): EShape {\n\t\tlet root: EShape = this;\n\t\twhile (root.parent instanceof EShapeBase) {\n\t\t\troot = root.parent;\n\t\t}\n\t\treturn root;\n\t}\n\n\tget connector(): EShapeConnectorContainer {\n\t\tlet result = this._connector;\n\t\tif (result == null) {\n\t\t\tresult = new EShapeConnectorContainerImpl(this);\n\t\t\tthis._connector = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tget visible(): boolean {\n\t\tif (this._visible) {\n\t\t\tconst parent = this.parent;\n\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\treturn parent.visible;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tset visible(visible: boolean) {\n\t\tif (this._visible !== visible) {\n\t\t\tthis._visible = visible;\n\t\t\tthis.updateUploaded(true);\n\t\t}\n\t}\n\n\tget worldVisible(): boolean {\n\t\tif (this._visible) {\n\t\t\tconst parent = this.parent;\n\t\t\tif (parent) {\n\t\t\t\treturn parent.worldVisible;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t//\n\tabstract clone(): EShape;\n\n\t//\n\ttoDirty(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent != null) {\n\t\t\tparent.toDirty();\n\t\t}\n\t}\n\n\t// Hierarchy\n\tattach(parent: EShapeContainer | EShape, at?: number): this {\n\t\tthis.detach();\n\t\tthis.parent = parent;\n\t\tconst children = parent.children;\n\t\tif (at != null && 0 <= at && at < children.length) {\n\t\t\tchildren.splice(at, 0, this);\n\t\t} else {\n\t\t\tchildren.push(this);\n\t\t}\n\t\tparent.onChildTransformChange();\n\t\tparent.toDirty();\n\t\tthis.onAttach();\n\t\treturn this;\n\t}\n\n\tonAttach(): void {\n\t\tthis.uploaded = undefined;\n\t\tconst connector = this._connector;\n\t\tif (connector) {\n\t\t\tconnector.attach();\n\t\t\tconnector.fit(true);\n\t\t}\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].onAttach();\n\t\t}\n\t}\n\n\tdetach(exceptions?: Set<EShape>): this {\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tthis.parent = null;\n\t\t\tconst children = parent.children;\n\t\t\tconst index = children.indexOf(this);\n\t\t\tif (0 <= index) {\n\t\t\t\tchildren.splice(index, 1);\n\t\t\t\tparent.onChildTransformChange();\n\t\t\t\tparent.toDirty();\n\t\t\t\tthis.onDetach(exceptions);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tonDetach(exceptions?: Set<EShape>): void {\n\t\tthis.uploaded = undefined;\n\t\tconst connector = this._connector;\n\t\tif (connector) {\n\t\t\tconnector.detach(exceptions);\n\t\t}\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].onDetach(exceptions);\n\t\t}\n\t}\n\n\t// Transform\n\tupdateTransform(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tif (parent.parent) {\n\t\t\t\tparent.updateTransform();\n\t\t\t}\n\t\t\tthis.transform.updateTransform(parent.transform);\n\t\t} else {\n\t\t\tthis.transform.updateTransform(Transform.IDENTITY);\n\t\t}\n\t}\n\n\t// Serialization\n\tserializeChildren(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem[] {\n\t\tconst children = this.children;\n\t\tconst childrenSerialized = [];\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tchildrenSerialized.push(child.serialize(manager));\n\t\t}\n\t\treturn childrenSerialized;\n\t}\n\n\tabstract serializeImage(manager: EShapeResourceManagerSerialization): number;\n\n\tabstract serializeGradient(manager: EShapeResourceManagerSerialization): number;\n\n\tserializeState(manager: EShapeResourceManagerSerialization): number {\n\t\tconst state = this.state;\n\t\treturn (this.interactive ? 1 : 0) | (state.isFocusable ? 0 : 2) | (state.isActive ? 4 : 0);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem {\n\t\tconst transform = this.transform;\n\t\tconst position = transform.position;\n\t\tconst pivot = transform.pivot;\n\t\tconst size = this.size;\n\t\tconst shortcut = this.shortcut;\n\t\tconst shortcutId = shortcut != null ? manager.addResource(shortcut) : -1;\n\t\tconst cursor = this.cursor;\n\t\tconst cursorId = cursor != null ? manager.addResource(cursor) : -1;\n\t\tconst title = this.title;\n\t\tconst titleId = title != null ? manager.addResource(title) : -1;\n\t\tlet capabilitiesAdded: EShapeCapability = EShapeCapability.NONE;\n\t\tlet capabilitiesRemoved: EShapeCapability = EShapeCapability.NONE;\n\t\tlet capabilitiesLocked: EShapeCapability = EShapeCapability.NONE;\n\t\tconst capability = this._capability;\n\t\tif (capability != null) {\n\t\t\tcapabilitiesAdded = capability.added;\n\t\t\tcapabilitiesRemoved = capability.removed;\n\t\t\tcapabilitiesLocked = capability.locked;\n\t\t}\n\t\treturn [\n\t\t\tthis.type,\n\t\t\tmanager.addResource(this.id),\n\t\t\tposition.x,\n\t\t\tposition.y,\n\t\t\tsize.x,\n\t\t\tsize.y,\n\t\t\ttransform.rotation,\n\t\t\ttransform.skew.x,\n\t\t\tthis.fill.serialize(manager),\n\t\t\tthis.stroke.serialize(manager),\n\t\t\tcursorId,\n\t\t\tthis.text.serialize(manager),\n\t\t\tthis.data.serialize(manager),\n\t\t\tthis.radius,\n\t\t\tthis.corner,\n\t\t\t-1,\n\t\t\t-1,\n\t\t\tthis.action.serialize(manager),\n\t\t\tthis.serializeImage(manager),\n\t\t\tthis.serializeGradient(manager),\n\t\t\tthis.serializeChildren(manager),\n\t\t\tpivot.x,\n\t\t\tpivot.y,\n\t\t\tthis.serializeState(manager),\n\t\t\tshortcutId,\n\t\t\ttitleId,\n\t\t\tthis.uuid,\n\t\t\tcapabilitiesAdded,\n\t\t\tcapabilitiesRemoved,\n\t\t\tcapabilitiesLocked\n\t\t];\n\t}\n\n\taddUuid(manager: EShapeResourceManagerSerialization): void {\n\t\tthis.uuid = manager.addUuid(this.uuid);\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].addUuid(manager);\n\t\t}\n\t}\n\n\tupdateUuid(manager: EShapeResourceManagerSerialization): void {\n\t\tthis.uuid = manager.updateUuid(this.uuid);\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].updateUuid(manager);\n\t\t}\n\t}\n\n\t// Hit test\n\tprotected getShapeScale(): number {\n\t\tconst container = this.root.parent as any;\n\t\tif (container != null && container.getShapeScale != null) {\n\t\t\treturn container.getShapeScale();\n\t\t}\n\t\treturn 1.0;\n\t}\n\n\tprotected getStrokeWidthScale(style: EShapeStrokeStyle): number {\n\t\tif (style & EShapeStrokeStyle.NON_EXPANDING_WIDTH) {\n\t\t\tif (style & EShapeStrokeStyle.NON_SHRINKING_WIDTH) {\n\t\t\t\treturn this.getShapeScale();\n\t\t\t} else {\n\t\t\t\treturn Math.min(1.0, this.getShapeScale());\n\t\t\t}\n\t\t} else {\n\t\t\tif (style & EShapeStrokeStyle.NON_SHRINKING_WIDTH) {\n\t\t\t\treturn Math.max(1.0, this.getShapeScale());\n\t\t\t} else {\n\t\t\t\treturn 1.0;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected getHitTestSize(result: EShapeBaseHitTestData): EShapeBaseHitTestData {\n\t\tconst size = this.size;\n\t\tresult.width = 0.5 * size.x;\n\t\tresult.height = 0.5 * size.y;\n\t\treturn result;\n\t}\n\n\ttoHitTestData(x: number, y: number): EShapeBaseHitTestData {\n\t\tconst result = this.getHitTestSize(\n\t\t\t(EShapeBase.WORK_HIT_TEST_DATA ??= new EShapeBaseHitTestData())\n\t\t);\n\t\tconst sx = result.width;\n\t\tconst sy = result.height;\n\t\tconst pivot = this.transform.pivot;\n\t\tconst dx = x - pivot.x;\n\t\tconst dy = y - pivot.y;\n\t\tconst stroke = this.stroke;\n\t\tconst strokeWidth = stroke.enable ? stroke.width : 0;\n\t\tconst strokeScale = this.getStrokeWidthScale(stroke.style);\n\t\tconst strokeAlign = stroke.align;\n\t\tconst s = strokeWidth * strokeScale * strokeAlign;\n\t\treturn result.set(\n\t\t\t0 <= sx ? +dx : -dx,\n\t\t\t0 <= sy ? +dy : -dy,\n\t\t\tMath.abs(sx) + s,\n\t\t\tMath.abs(sy) + s,\n\t\t\tstrokeWidth,\n\t\t\tstrokeScale,\n\t\t\tstrokeAlign\n\t\t);\n\t}\n\n\tcontains(x: number, y: number): EShape | null {\n\t\tconst data = this.toHitTestData(x, y);\n\t\tif (\n\t\t\tthis.containsAbs(\n\t\t\t\tdata.x,\n\t\t\t\tdata.y,\n\t\t\t\tdata.width,\n\t\t\t\tdata.height,\n\t\t\t\tdata.strokeWidth,\n\t\t\t\tdata.strokeScale,\n\t\t\t\tdata.strokeAlign\n\t\t\t)\n\t\t) {\n\t\t\treturn this;\n\t\t}\n\t\treturn this.containsText(x, y) || this.containsChildren(x, y);\n\t}\n\n\tprotected containsText(x: number, y: number): EShape | null {\n\t\tconst text = this.text;\n\t\tconst textAtlas = text.atlas;\n\t\tif (textAtlas != null) {\n\t\t\tconst textWorld = text.world;\n\t\t\tif (textWorld != null) {\n\t\t\t\tconst transform = this.transform.internalTransform;\n\t\t\t\tconst tx = transform.a * x + transform.c * y + transform.tx - textWorld[0];\n\t\t\t\tconst ty = transform.b * x + transform.d * y + transform.ty - textWorld[1];\n\t\t\t\tconst th = textWorld[2] * tx + textWorld[3] * ty;\n\t\t\t\tconst tv = textWorld[4] * tx + textWorld[5] * ty;\n\t\t\t\tconst w = textWorld[6];\n\t\t\t\tconst h = textWorld[7];\n\t\t\t\tif (0 <= th && th <= w && 0 <= tv && tv <= h) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected containsChildren(x: number, y: number): EShape | null {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tconst child = children[i];\n\t\t\tchild.updateTransform();\n\t\t\tconst localTransform = child.transform.localTransform;\n\t\t\tconst a = localTransform.a;\n\t\t\tconst b = localTransform.b;\n\t\t\tconst c = localTransform.c;\n\t\t\tconst d = localTransform.d;\n\t\t\tconst tx = localTransform.tx;\n\t\t\tconst ty = localTransform.ty;\n\t\t\tconst id = 1 / (a * d - c * b);\n\t\t\tconst lx = (d * x - c * y + ty * c - tx * d) * id;\n\t\t\tconst ly = (a * y - b * x - ty * a + tx * b) * id;\n\t\t\tconst childResult = child.contains(lx, ly);\n\t\t\tif (childResult != null) {\n\t\t\t\treturn childResult;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tcontainsBBox(x: number, y: number): boolean {\n\t\tconst data = this.toHitTestData(x, y);\n\t\treturn this.containsAbsBBox(data.x, data.y, data.width, data.height);\n\t}\n\n\tcontainsAbs(\n\t\tx: number,\n\t\ty: number,\n\t\tax: number,\n\t\tay: number,\n\t\tsw: number,\n\t\tss: number,\n\t\tsa: number\n\t): boolean {\n\t\treturn this.containsAbsBBox(x, y, ax, ay);\n\t}\n\n\tcontainsAbsBBox(x: number, y: number, ax: number, ay: number): boolean {\n\t\treturn hitTestBBox(x, y, ax, ay);\n\t}\n\n\tselect(point: Point): boolean {\n\t\treturn false;\n\t}\n\n\t//\n\ttoGlobal(position: IPoint, result: Point, skipUpdate?: boolean): Point {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tresult.copyFrom(position);\n\t\tthis.transform.worldTransform.apply(result, result);\n\t\treturn result;\n\t}\n\n\ttoLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tif (result === undefined) {\n\t\t\tresult = new Point();\n\t\t}\n\t\tresult.copyFrom(position);\n\t\tthis.transform.worldTransform.applyInverse(result, result);\n\t\treturn result;\n\t}\n\n\tgetBounds(skipUpdate?: boolean, result?: Rectangle): Rectangle {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tconst bounds = this._bounds || new Rectangle();\n\t\tthis._bounds = bounds;\n\t\tconst worldId = this.transform.getWorldId();\n\t\tif (worldId !== this._boundsTransformId) {\n\t\t\tthis._boundsTransformId = worldId;\n\t\t\tthis.getBounds_(this.transform.worldTransform, bounds);\n\t\t}\n\t\tresult ??= new Rectangle();\n\t\tresult.copyFrom(bounds);\n\t\treturn result;\n\t}\n\n\tgetBoundsInternal(skipUpdate?: boolean, result?: Rectangle): Rectangle {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tconst boundsInternal = this._boundsInternal || new Rectangle();\n\t\tthis._boundsInternal = boundsInternal;\n\t\tconst currentLocalId = this.transform.getLocalIdCurrent();\n\t\tif (currentLocalId !== this._boundsInternalTransformId) {\n\t\t\tthis._boundsInternalTransformId = currentLocalId;\n\t\t\tthis.getBounds_(this.transform.internalTransform, boundsInternal);\n\t\t}\n\t\tresult ??= new Rectangle();\n\t\tresult.copyFrom(boundsInternal);\n\t\treturn result;\n\t}\n\n\tgetBoundsLocal(skipUpdate?: boolean, result?: Rectangle): Rectangle {\n\t\tif (skipUpdate !== true) {\n\t\t\tthis.updateTransform();\n\t\t}\n\t\tconst boundsLocal = this._boundsLocal || new Rectangle();\n\t\tthis._boundsLocal = boundsLocal;\n\t\tconst currentLocalId = this.transform.getLocalIdCurrent();\n\t\tif (currentLocalId !== this._boundsLocalTransformId) {\n\t\t\tthis._boundsLocalTransformId = currentLocalId;\n\t\t\tthis.getBounds_(this.transform.localTransform, boundsLocal);\n\t\t}\n\t\tresult ??= new Rectangle();\n\t\tresult.copyFrom(boundsLocal);\n\t\treturn result;\n\t}\n\n\tprotected getBoundsSize(): IPoint {\n\t\treturn this.size;\n\t}\n\n\tprotected getBounds_(transform: Matrix, result: Rectangle): Rectangle {\n\t\tconst pivot = this.transform.pivot;\n\t\tconst px = pivot.x;\n\t\tconst py = pivot.y;\n\t\tconst size = this.getBoundsSize();\n\t\tconst sx = 0.5 * size.x;\n\t\tconst sy = 0.5 * size.y;\n\n\t\tconst a = transform.a;\n\t\tconst b = transform.b;\n\t\tconst c = transform.c;\n\t\tconst d = transform.d;\n\n\t\tlet x = -sx + px;\n\t\tlet y = -sy + py;\n\t\tconst x0 = a * x + c * y;\n\t\tconst y0 = b * x + d * y;\n\n\t\tx = +sx + px;\n\t\ty = -sy + py;\n\t\tconst x1 = a * x + c * y;\n\t\tconst y1 = b * x + d * y;\n\n\t\tx = -sx + px;\n\t\ty = +sy + py;\n\t\tconst x2 = a * x + c * y;\n\t\tconst y2 = b * x + d * y;\n\n\t\tx = +sx + px;\n\t\ty = +sy + py;\n\t\tconst x3 = a * x + c * y;\n\t\tconst y3 = b * x + d * y;\n\n\t\tconst xmin = Math.min(x0, x1, x2, x3);\n\t\tconst ymin = Math.min(y0, y1, y2, y3);\n\t\tconst xmax = Math.max(x0, x1, x2, x3);\n\t\tconst ymax = Math.max(y0, y1, y2, y3);\n\t\tresult.x = xmin + transform.tx;\n\t\tresult.y = ymin + transform.ty;\n\t\tresult.width = xmax - xmin;\n\t\tresult.height = ymax - ymin;\n\t\treturn result;\n\t}\n\n\t//\n\tdestroy(): void {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tchildren[i].destroy();\n\t\t}\n\t\tchildren.length = 0;\n\t}\n\n\t//\n\tprotected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime != null) {\n\t\t\truntime.onStateChange(this, newState, oldState);\n\t\t}\n\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof EShapeBase) {\n\t\t\t\tchild.state.onParentChange(newState, oldState);\n\t\t\t}\n\t\t}\n\t}\n\n\tget state(): EShapeStateSet {\n\t\tlet result = this._state;\n\t\tif (result == null) {\n\t\t\tresult = new EShapeStateSetImplObservable((newState, oldState): void => {\n\t\t\t\tthis.onStateChange(newState, oldState);\n\t\t\t});\n\t\t\tthis._state = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tget capability(): EShapeCapabilityContainer {\n\t\tlet result = this._capability;\n\t\tif (result == null) {\n\t\t\tresult = new EShapeCapabilityContainerImpl();\n\t\t\tthis._capability = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tgetCapability(): EShapeCapabilityContainer | undefined {\n\t\treturn this._capability;\n\t}\n\n\tfocus(): this {\n\t\tthis.setFocused(true);\n\t\treturn this;\n\t}\n\n\tblur(): this {\n\t\tthis.setFocused(false);\n\t\treturn this;\n\t}\n\n\tprotected setFocused(isFocused: boolean): void {\n\t\tif (this.state.isFocused !== isFocused) {\n\t\t\tconst layer = DApplications.getLayer(this);\n\t\t\tif (layer) {\n\t\t\t\tlayer.getFocusController().set(this, isFocused);\n\t\t\t}\n\t\t}\n\t}\n\n\tonKeyDown(e: KeyboardEvent): boolean {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime) {\n\t\t\treturn runtime.onKeyDown(this, e);\n\t\t}\n\t\treturn false;\n\t}\n\n\tonKeyUp(e: KeyboardEvent): boolean {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime) {\n\t\t\treturn runtime.onKeyUp(this, e);\n\t\t}\n\t\treturn false;\n\t}\n\n\t//\n\tupdate(time: number): void {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime) {\n\t\t\truntime.update(this, time);\n\t\t}\n\t}\n\n\tonRender(time: number, renderer: Renderer): void {\n\t\tconst runtime = this.runtime;\n\t\tif (runtime) {\n\t\t\truntime.onRender(this, time, renderer);\n\t\t}\n\t}\n\n\tcopy(source: EShape, part: EShapeCopyPart = EShapeCopyPart.ALL): this {\n\t\tthis.lock(EShapeLockPart.ALL);\n\t\tthis.id = source.id;\n\t\tthis.uuid = source.uuid;\n\t\tthis.visible = source.visible;\n\t\tif (part & EShapeCopyPart.TRANSFORM) {\n\t\t\tconst transform = this.transform;\n\t\t\tconst sourceTransform = source.transform;\n\t\t\ttransform.position.copyFrom(sourceTransform.position);\n\t\t\ttransform.rotation = sourceTransform.rotation;\n\t\t\ttransform.skew.copyFrom(sourceTransform.skew);\n\t\t\ttransform.pivot.copyFrom(sourceTransform.pivot);\n\t\t\ttransform.scale.copyFrom(sourceTransform.scale);\n\t\t}\n\t\tif (part & EShapeCopyPart.SIZE) {\n\t\t\tthis.size.copyFrom(source.size);\n\t\t}\n\t\tif (part & EShapeCopyPart.STYLE) {\n\t\t\tthis.fill.copy(source.fill);\n\t\t\tthis.stroke.copy(source.stroke);\n\t\t\tthis.text.copy(source.text);\n\t\t\tthis.radius = source.radius;\n\t\t\tthis.corner = source.corner;\n\t\t}\n\t\tif (part & EShapeCopyPart.DATA) {\n\t\t\tthis.data.copy(source.data);\n\t\t}\n\t\tif (part & EShapeCopyPart.IMAGE) {\n\t\t\tthis.image = source.image;\n\t\t}\n\t\tif (part & EShapeCopyPart.ACTION) {\n\t\t\tthis.action.clearAndAddAll(source.action.values);\n\t\t\tthis.interactive = source.interactive;\n\t\t\tthis.cursor = source.cursor;\n\t\t\tthis.shortcut = source.shortcut;\n\t\t}\n\t\tif (part & EShapeCopyPart.POINTS) {\n\t\t\tconst sourcePoints = source.points;\n\t\t\tif (sourcePoints != null) {\n\t\t\t\tconst points = this.points;\n\t\t\t\tif (points != null) {\n\t\t\t\t\tpoints.copy(sourcePoints);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeCopyPart.STATE) {\n\t\t\tthis.state.lock(false).copy(source.state).unlock();\n\t\t}\n\t\tif (part & EShapeCopyPart.CONNECTOR) {\n\t\t\tif (source instanceof EShapeBase) {\n\t\t\t\tconst sourceConnector = source._connector;\n\t\t\t\tif (sourceConnector) {\n\t\t\t\t\tthis.connector.copy(sourceConnector);\n\t\t\t\t} else {\n\t\t\t\t\tconst connector = this._connector;\n\t\t\t\t\tif (connector) {\n\t\t\t\t\t\tconnector.clear();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst connector = this._connector;\n\t\t\t\tif (connector) {\n\t\t\t\t\tconnector.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (part & EShapeCopyPart.CAPABILITY) {\n\t\t\tconst sourceCapability = source.getCapability();\n\t\t\tif (sourceCapability != null) {\n\t\t\t\tthis.capability.copy(sourceCapability);\n\t\t\t} else {\n\t\t\t\tconst capability = this._capability;\n\t\t\t\tif (capability != null) {\n\t\t\t\t\tcapability.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.unlock(EShapeLockPart.ALL, true);\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -100,6 +100,9 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
|
|
|
100
100
|
enumerable: false,
|
|
101
101
|
configurable: true
|
|
102
102
|
});
|
|
103
|
+
EShapeGroupViewer.prototype.serializeGradient = function (manager) {
|
|
104
|
+
return -1;
|
|
105
|
+
};
|
|
103
106
|
Object.defineProperty(EShapeGroupViewer.prototype, "radius", {
|
|
104
107
|
get: function () {
|
|
105
108
|
return 0;
|
|
@@ -120,6 +123,9 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
|
|
|
120
123
|
enumerable: false,
|
|
121
124
|
configurable: true
|
|
122
125
|
});
|
|
126
|
+
EShapeGroupViewer.prototype.serializeImage = function (manager) {
|
|
127
|
+
return -1;
|
|
128
|
+
};
|
|
123
129
|
Object.defineProperty(EShapeGroupViewer.prototype, "points", {
|
|
124
130
|
get: function () {
|
|
125
131
|
return undefined;
|