@visactor/vrender-core 1.1.1-alpha.0 → 1.1.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +21 -20
- package/cjs/index.js.map +1 -1
- package/cjs/render/contributions/render/index.d.ts +4 -0
- package/cjs/render/contributions/render/index.js +5 -3
- package/cjs/render/contributions/render/index.js.map +1 -1
- package/dist/index.es.js +639 -639
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/es/render/contributions/render/index.d.ts +4 -0
- package/es/render/contributions/render/index.js +8 -0
- package/es/render/contributions/render/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -23957,103 +23957,380 @@ class DefaultCanvasArcRender extends BaseRender {
|
|
|
23957
23957
|
}
|
|
23958
23958
|
}
|
|
23959
23959
|
|
|
23960
|
-
|
|
23961
|
-
|
|
23962
|
-
|
|
23963
|
-
|
|
23964
|
-
|
|
23965
|
-
|
|
23966
|
-
|
|
23967
|
-
|
|
23968
|
-
|
|
23969
|
-
];
|
|
23970
|
-
this.init(graphicRenderContributions);
|
|
23960
|
+
function drawArcPath(arc, context, cx, cy, z, outerRadius, innerRadius) {
|
|
23961
|
+
const { startAngle, endAngle } = arc.getParsedAngle();
|
|
23962
|
+
const deltaAngle = abs(endAngle - startAngle);
|
|
23963
|
+
const clockwise = endAngle > startAngle;
|
|
23964
|
+
let collapsedToLine = false;
|
|
23965
|
+
if (outerRadius < innerRadius) {
|
|
23966
|
+
const temp = outerRadius;
|
|
23967
|
+
outerRadius = innerRadius;
|
|
23968
|
+
innerRadius = temp;
|
|
23971
23969
|
}
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
|
|
23975
|
-
|
|
23970
|
+
if (outerRadius <= epsilon) {
|
|
23971
|
+
context.moveTo(cx, cy, z);
|
|
23972
|
+
}
|
|
23973
|
+
else if (deltaAngle >= pi2 - epsilon) {
|
|
23974
|
+
context.moveTo(cx + outerRadius * cos(startAngle), cy + outerRadius * sin(startAngle), z);
|
|
23975
|
+
context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise, z);
|
|
23976
|
+
if (innerRadius > epsilon) {
|
|
23977
|
+
context.moveTo(cx + innerRadius * cos(endAngle), cy + innerRadius * sin(endAngle), z);
|
|
23978
|
+
context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise, z);
|
|
23979
|
+
}
|
|
23980
|
+
}
|
|
23981
|
+
else {
|
|
23982
|
+
const { outerDeltaAngle, innerDeltaAngle, outerStartAngle, outerEndAngle, innerEndAngle, innerStartAngle } = arc.getParsePadAngle(startAngle, endAngle);
|
|
23983
|
+
const xors = outerRadius * cos(outerStartAngle);
|
|
23984
|
+
const yors = outerRadius * sin(outerStartAngle);
|
|
23985
|
+
const xire = innerRadius * cos(innerEndAngle);
|
|
23986
|
+
const yire = innerRadius * sin(innerEndAngle);
|
|
23987
|
+
if (outerDeltaAngle < 0.001) {
|
|
23988
|
+
collapsedToLine = true;
|
|
23989
|
+
}
|
|
23990
|
+
else {
|
|
23991
|
+
context.moveTo(cx + xors, cy + yors, z);
|
|
23992
|
+
context.arc(cx, cy, outerRadius, outerStartAngle, outerEndAngle, !clockwise, z);
|
|
23993
|
+
}
|
|
23994
|
+
if (!(innerRadius > epsilon) || innerDeltaAngle < 0.001) {
|
|
23995
|
+
context.lineTo(cx + xire, cy + yire, z);
|
|
23996
|
+
collapsedToLine = true;
|
|
23997
|
+
}
|
|
23998
|
+
else {
|
|
23999
|
+
context.lineTo(cx + xire, cy + yire, z);
|
|
24000
|
+
context.arc(cx, cy, innerRadius, innerEndAngle, innerStartAngle, clockwise, z);
|
|
24001
|
+
}
|
|
24002
|
+
}
|
|
24003
|
+
context.closePath();
|
|
24004
|
+
return collapsedToLine;
|
|
24005
|
+
}
|
|
24006
|
+
function drawInnerOuterArcPath(arc, context, cx, cy, z1, z2, radius, getParsePadAngle) {
|
|
24007
|
+
const { startAngle, endAngle } = arc.getParsedAngle();
|
|
24008
|
+
const deltaAngle = abs(endAngle - startAngle);
|
|
24009
|
+
const clockwise = endAngle > startAngle;
|
|
24010
|
+
let collapsedToLine = false;
|
|
24011
|
+
if (radius <= epsilon) {
|
|
24012
|
+
context.moveTo(cx, cy, z1);
|
|
24013
|
+
}
|
|
24014
|
+
else if (deltaAngle >= pi2 - epsilon) {
|
|
24015
|
+
context.moveTo(cx + radius * cos(startAngle), cy + radius * sin(startAngle), z1);
|
|
24016
|
+
context.arc(cx, cy, radius, startAngle, endAngle, !clockwise, z1);
|
|
24017
|
+
context.lineTo(cx + radius * cos(endAngle), cy + radius * sin(endAngle), z2);
|
|
24018
|
+
context.arc(cx, cy, radius, endAngle, startAngle, clockwise, z2);
|
|
24019
|
+
}
|
|
24020
|
+
else {
|
|
24021
|
+
const { innerouterDeltaAngle, innerouterStartAngle, innerouterEndAngle } = getParsePadAngle(startAngle, endAngle);
|
|
24022
|
+
const xors = radius * cos(innerouterStartAngle);
|
|
24023
|
+
const yors = radius * sin(innerouterStartAngle);
|
|
24024
|
+
const xore = radius * cos(innerouterEndAngle);
|
|
24025
|
+
const yore = radius * sin(innerouterEndAngle);
|
|
24026
|
+
if (innerouterDeltaAngle < 0.001) {
|
|
24027
|
+
collapsedToLine = true;
|
|
24028
|
+
}
|
|
24029
|
+
else {
|
|
24030
|
+
context.moveTo(cx + xors, cy + yors, z1);
|
|
24031
|
+
context.arc(cx, cy, radius, innerouterStartAngle, innerouterEndAngle, !clockwise, z1);
|
|
24032
|
+
context.lineTo(cx + xore, cy + yore, z2);
|
|
24033
|
+
context.arc(cx, cy, radius, innerouterEndAngle, innerouterStartAngle, clockwise, z2);
|
|
24034
|
+
}
|
|
24035
|
+
}
|
|
24036
|
+
context.closePath();
|
|
24037
|
+
return collapsedToLine;
|
|
24038
|
+
}
|
|
24039
|
+
class DefaultCanvasArc3DRender extends BaseRender {
|
|
24040
|
+
constructor() {
|
|
24041
|
+
super(...arguments);
|
|
24042
|
+
this.numberType = ARC3D_NUMBER_TYPE;
|
|
24043
|
+
}
|
|
24044
|
+
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
24045
|
+
var _a;
|
|
24046
|
+
const arcAttribute = getTheme(arc, params === null || params === void 0 ? void 0 : params.theme).arc;
|
|
24047
|
+
const { fill = arcAttribute.fill } = arc.attribute;
|
|
24048
|
+
const data = this.valid(arc, arcAttribute, fillCb, strokeCb);
|
|
23976
24049
|
if (!data) {
|
|
23977
24050
|
return;
|
|
23978
24051
|
}
|
|
23979
24052
|
const { fVisible, sVisible, doFill, doStroke } = data;
|
|
23980
|
-
|
|
23981
|
-
|
|
23982
|
-
|
|
23983
|
-
|
|
23984
|
-
|
|
23985
|
-
const
|
|
24053
|
+
const z = (_a = this.z) !== null && _a !== void 0 ? _a : 0;
|
|
24054
|
+
const { outerPadding = arcAttribute.outerPadding, innerPadding = arcAttribute.innerPadding, height = 10 } = arc.attribute;
|
|
24055
|
+
let { outerRadius = arcAttribute.outerRadius, innerRadius = arcAttribute.innerRadius } = arc.attribute;
|
|
24056
|
+
outerRadius += outerPadding;
|
|
24057
|
+
innerRadius -= innerPadding;
|
|
24058
|
+
const rgbArray = ColorStore.Get(fill, ColorType.Color255);
|
|
24059
|
+
const { light } = drawContext.stage || {};
|
|
24060
|
+
const face = drawContext.hack_pieFace;
|
|
24061
|
+
const z_face = {
|
|
24062
|
+
top: z,
|
|
24063
|
+
bottom: z + height
|
|
24064
|
+
};
|
|
24065
|
+
const n_face = {
|
|
24066
|
+
top: [0, 1, 0],
|
|
24067
|
+
bottom: [0, -1, 0],
|
|
24068
|
+
outside: [1, 0, -1],
|
|
24069
|
+
inside: [1, 0, -1]
|
|
24070
|
+
};
|
|
24071
|
+
if (face === 'bottom' || face === 'top') {
|
|
24072
|
+
context.beginPath();
|
|
24073
|
+
drawArcPath(arc, context, x, y, z_face[face], outerRadius, innerRadius);
|
|
24074
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute);
|
|
23986
24075
|
if (doFill) {
|
|
23987
24076
|
if (fillCb) {
|
|
23988
|
-
fillCb(context,
|
|
24077
|
+
fillCb(context, arc.attribute, arcAttribute);
|
|
23989
24078
|
}
|
|
23990
24079
|
else if (fVisible) {
|
|
23991
|
-
context.setCommonStyle(
|
|
24080
|
+
context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute);
|
|
24081
|
+
context.fillStyle = light ? light.computeColor(n_face[face], rgbArray) : fill;
|
|
23992
24082
|
context.fill();
|
|
23993
24083
|
}
|
|
23994
24084
|
}
|
|
23995
|
-
};
|
|
23996
|
-
const _runStroke = () => {
|
|
23997
24085
|
if (doStroke) {
|
|
23998
24086
|
if (strokeCb) {
|
|
23999
|
-
strokeCb(context,
|
|
24087
|
+
strokeCb(context, arc.attribute, arcAttribute);
|
|
24000
24088
|
}
|
|
24001
24089
|
else if (sVisible) {
|
|
24002
|
-
context.setStrokeStyle(
|
|
24090
|
+
context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute);
|
|
24003
24091
|
context.stroke();
|
|
24004
24092
|
}
|
|
24005
24093
|
}
|
|
24006
|
-
};
|
|
24007
|
-
if (!fillStrokeOrder) {
|
|
24008
|
-
_runFill();
|
|
24009
|
-
_runStroke();
|
|
24010
|
-
}
|
|
24011
|
-
else {
|
|
24012
|
-
_runStroke();
|
|
24013
|
-
_runFill();
|
|
24014
|
-
}
|
|
24015
|
-
this.afterRenderStep(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
|
|
24016
|
-
}
|
|
24017
|
-
draw(circle, renderService, drawContext, params) {
|
|
24018
|
-
const circleAttribute = getTheme(circle, params === null || params === void 0 ? void 0 : params.theme).circle;
|
|
24019
|
-
this._draw(circle, circleAttribute, false, drawContext, params);
|
|
24020
|
-
}
|
|
24021
|
-
}
|
|
24022
|
-
|
|
24023
|
-
function drawSegItem(ctx, curve, endPercent, params) {
|
|
24024
|
-
if (!curve.p1) {
|
|
24025
|
-
return;
|
|
24026
|
-
}
|
|
24027
|
-
const { offsetX = 0, offsetY = 0, offsetZ = 0 } = params || {};
|
|
24028
|
-
if (endPercent === 1) {
|
|
24029
|
-
if (curve.p2 && curve.p3) {
|
|
24030
|
-
ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ);
|
|
24031
24094
|
}
|
|
24032
|
-
else {
|
|
24033
|
-
|
|
24095
|
+
else if (face === 'outside' || face === 'inside') {
|
|
24096
|
+
if (face === 'inside') {
|
|
24097
|
+
context.save();
|
|
24098
|
+
context.beginPath();
|
|
24099
|
+
context.arc(x, y, innerRadius, 0, pi2, true, z_face.top);
|
|
24100
|
+
context.clip();
|
|
24101
|
+
}
|
|
24102
|
+
context.beginPath();
|
|
24103
|
+
drawInnerOuterArcPath(arc, context, x, y, z_face.top, z_face.bottom, face === 'outside' ? outerRadius : innerRadius, (startAngle, endAngle) => {
|
|
24104
|
+
const { outerDeltaAngle, innerDeltaAngle, outerStartAngle, outerEndAngle, innerEndAngle, innerStartAngle } = arc.getParsePadAngle(startAngle, endAngle);
|
|
24105
|
+
if (face === 'outside') {
|
|
24106
|
+
return {
|
|
24107
|
+
innerouterDeltaAngle: outerDeltaAngle,
|
|
24108
|
+
innerouterEndAngle: outerEndAngle,
|
|
24109
|
+
innerouterStartAngle: outerStartAngle
|
|
24110
|
+
};
|
|
24111
|
+
}
|
|
24112
|
+
return {
|
|
24113
|
+
innerouterDeltaAngle: innerDeltaAngle,
|
|
24114
|
+
innerouterEndAngle: innerEndAngle,
|
|
24115
|
+
innerouterStartAngle: innerStartAngle
|
|
24116
|
+
};
|
|
24117
|
+
});
|
|
24118
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute);
|
|
24119
|
+
if (doFill) {
|
|
24120
|
+
if (fillCb) {
|
|
24121
|
+
fillCb(context, arc.attribute, arcAttribute);
|
|
24122
|
+
}
|
|
24123
|
+
else if (fVisible) {
|
|
24124
|
+
context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute);
|
|
24125
|
+
context.fillStyle = light ? light.computeColor(n_face[face], rgbArray) : fill;
|
|
24126
|
+
context.fill();
|
|
24127
|
+
}
|
|
24128
|
+
}
|
|
24129
|
+
if (doStroke) {
|
|
24130
|
+
if (strokeCb) {
|
|
24131
|
+
strokeCb(context, arc.attribute, arcAttribute);
|
|
24132
|
+
}
|
|
24133
|
+
else if (sVisible) {
|
|
24134
|
+
context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute);
|
|
24135
|
+
context.stroke();
|
|
24136
|
+
}
|
|
24137
|
+
}
|
|
24138
|
+
if (face === 'inside') {
|
|
24139
|
+
context.restore();
|
|
24140
|
+
}
|
|
24034
24141
|
}
|
|
24035
24142
|
}
|
|
24036
|
-
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
|
|
24040
|
-
}
|
|
24041
|
-
else {
|
|
24042
|
-
const p = curve.getPointAt(endPercent);
|
|
24043
|
-
ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
|
|
24044
|
-
}
|
|
24143
|
+
draw(arc, renderService, drawContext, params) {
|
|
24144
|
+
const arcAttribute = getTheme(arc, params === null || params === void 0 ? void 0 : params.theme).arc;
|
|
24145
|
+
this._draw(arc, arcAttribute, false, drawContext, params);
|
|
24045
24146
|
}
|
|
24046
24147
|
}
|
|
24047
24148
|
|
|
24048
|
-
|
|
24049
|
-
|
|
24050
|
-
|
|
24051
|
-
|
|
24052
|
-
|
|
24053
|
-
|
|
24149
|
+
class Base3dRender extends BaseRender {
|
|
24150
|
+
stroke(x, y, z, face3d, context) {
|
|
24151
|
+
const vertices = face3d.vertices;
|
|
24152
|
+
face3d.edges.forEach(edge => {
|
|
24153
|
+
const p1 = vertices[edge[0]];
|
|
24154
|
+
const v1 = {
|
|
24155
|
+
x: x + p1[0],
|
|
24156
|
+
y: y + p1[1],
|
|
24157
|
+
z: z + p1[2]
|
|
24158
|
+
};
|
|
24159
|
+
const p2 = vertices[edge[1]];
|
|
24160
|
+
const v2 = {
|
|
24161
|
+
x: x + p2[0],
|
|
24162
|
+
y: y + p2[1],
|
|
24163
|
+
z: z + p2[2]
|
|
24164
|
+
};
|
|
24165
|
+
context.beginPath();
|
|
24166
|
+
context.moveTo(v1.x, v1.y, v1.z);
|
|
24167
|
+
context.lineTo(v2.x, v2.y, v2.z);
|
|
24168
|
+
context.stroke();
|
|
24169
|
+
});
|
|
24054
24170
|
}
|
|
24055
|
-
|
|
24056
|
-
|
|
24171
|
+
fill(x, y, z, face3d, faces, fillColor, context, light, graphic3d, graphic3dAttribute, fillCb) {
|
|
24172
|
+
const rgbArray = ColorStore.Get(fillColor, ColorType.Color255);
|
|
24173
|
+
const vertices = face3d.vertices;
|
|
24174
|
+
const viewdVerticesZ = vertices.map(v => {
|
|
24175
|
+
return context.view(v[0], v[1], v[2])[2];
|
|
24176
|
+
});
|
|
24177
|
+
const sortFace = [];
|
|
24178
|
+
face3d.polygons.forEach((p, i) => {
|
|
24179
|
+
if (faces && !faces[i]) {
|
|
24180
|
+
return;
|
|
24181
|
+
}
|
|
24182
|
+
sortFace.push({
|
|
24183
|
+
faceIdx: i,
|
|
24184
|
+
polygon: p
|
|
24185
|
+
});
|
|
24186
|
+
const { polygon } = p;
|
|
24187
|
+
const z1 = viewdVerticesZ[polygon[0]];
|
|
24188
|
+
const z2 = viewdVerticesZ[polygon[1]];
|
|
24189
|
+
const z3 = viewdVerticesZ[polygon[2]];
|
|
24190
|
+
const z4 = viewdVerticesZ[polygon[3]];
|
|
24191
|
+
p.ave_z = z1 + z2 + z3 + z4;
|
|
24192
|
+
});
|
|
24193
|
+
sortFace.sort((a, b) => b.polygon.ave_z - a.polygon.ave_z);
|
|
24194
|
+
sortFace.forEach(item => {
|
|
24195
|
+
const { polygon, normal } = item.polygon;
|
|
24196
|
+
const p1 = vertices[polygon[0]];
|
|
24197
|
+
const p2 = vertices[polygon[1]];
|
|
24198
|
+
const p3 = vertices[polygon[2]];
|
|
24199
|
+
const p4 = vertices[polygon[3]];
|
|
24200
|
+
const v1 = {
|
|
24201
|
+
x: x + p1[0],
|
|
24202
|
+
y: y + p1[1],
|
|
24203
|
+
z: z + p1[2]
|
|
24204
|
+
};
|
|
24205
|
+
const v2 = {
|
|
24206
|
+
x: x + p2[0],
|
|
24207
|
+
y: y + p2[1],
|
|
24208
|
+
z: z + p2[2]
|
|
24209
|
+
};
|
|
24210
|
+
const v3 = {
|
|
24211
|
+
x: x + p3[0],
|
|
24212
|
+
y: y + p3[1],
|
|
24213
|
+
z: z + p3[2]
|
|
24214
|
+
};
|
|
24215
|
+
const v4 = {
|
|
24216
|
+
x: x + p4[0],
|
|
24217
|
+
y: y + p4[1],
|
|
24218
|
+
z: z + p4[2]
|
|
24219
|
+
};
|
|
24220
|
+
context.beginPath();
|
|
24221
|
+
context.moveTo(v1.x, v1.y, v1.z);
|
|
24222
|
+
context.lineTo(v2.x, v2.y, v2.z);
|
|
24223
|
+
context.lineTo(v3.x, v3.y, v3.z);
|
|
24224
|
+
context.lineTo(v4.x, v4.y, v4.z);
|
|
24225
|
+
context.closePath();
|
|
24226
|
+
if (fillCb) {
|
|
24227
|
+
fillCb(context, graphic3d && graphic3d.attribute, graphic3dAttribute);
|
|
24228
|
+
}
|
|
24229
|
+
else {
|
|
24230
|
+
context.fillStyle = light ? light.computeColor(normal, rgbArray) : fillColor;
|
|
24231
|
+
context.fill();
|
|
24232
|
+
}
|
|
24233
|
+
});
|
|
24234
|
+
}
|
|
24235
|
+
}
|
|
24236
|
+
|
|
24237
|
+
class DefaultCanvasCircleRender extends BaseRender {
|
|
24238
|
+
constructor(graphicRenderContributions) {
|
|
24239
|
+
super();
|
|
24240
|
+
this.graphicRenderContributions = graphicRenderContributions;
|
|
24241
|
+
this.numberType = CIRCLE_NUMBER_TYPE;
|
|
24242
|
+
this.builtinContributions = [
|
|
24243
|
+
defaultCircleRenderContribution,
|
|
24244
|
+
defaultCircleBackgroundRenderContribution,
|
|
24245
|
+
defaultCircleTextureRenderContribution
|
|
24246
|
+
];
|
|
24247
|
+
this.init(graphicRenderContributions);
|
|
24248
|
+
}
|
|
24249
|
+
drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
24250
|
+
const circleAttribute = getTheme(circle, params === null || params === void 0 ? void 0 : params.theme).circle;
|
|
24251
|
+
const { radius = circleAttribute.radius, startAngle = circleAttribute.startAngle, endAngle = circleAttribute.endAngle, x: originX = circleAttribute.x, y: originY = circleAttribute.y, fillStrokeOrder = circleAttribute.fillStrokeOrder } = circle.attribute;
|
|
24252
|
+
const data = this.valid(circle, circleAttribute, fillCb, strokeCb);
|
|
24253
|
+
if (!data) {
|
|
24254
|
+
return;
|
|
24255
|
+
}
|
|
24256
|
+
const { fVisible, sVisible, doFill, doStroke } = data;
|
|
24257
|
+
context.beginPath();
|
|
24258
|
+
context.arc(x, y, radius, startAngle, endAngle);
|
|
24259
|
+
context.closePath();
|
|
24260
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(circle, circle.attribute, circleAttribute);
|
|
24261
|
+
this.beforeRenderStep(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
|
|
24262
|
+
const _runFill = () => {
|
|
24263
|
+
if (doFill) {
|
|
24264
|
+
if (fillCb) {
|
|
24265
|
+
fillCb(context, circle.attribute, circleAttribute);
|
|
24266
|
+
}
|
|
24267
|
+
else if (fVisible) {
|
|
24268
|
+
context.setCommonStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute);
|
|
24269
|
+
context.fill();
|
|
24270
|
+
}
|
|
24271
|
+
}
|
|
24272
|
+
};
|
|
24273
|
+
const _runStroke = () => {
|
|
24274
|
+
if (doStroke) {
|
|
24275
|
+
if (strokeCb) {
|
|
24276
|
+
strokeCb(context, circle.attribute, circleAttribute);
|
|
24277
|
+
}
|
|
24278
|
+
else if (sVisible) {
|
|
24279
|
+
context.setStrokeStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute);
|
|
24280
|
+
context.stroke();
|
|
24281
|
+
}
|
|
24282
|
+
}
|
|
24283
|
+
};
|
|
24284
|
+
if (!fillStrokeOrder) {
|
|
24285
|
+
_runFill();
|
|
24286
|
+
_runStroke();
|
|
24287
|
+
}
|
|
24288
|
+
else {
|
|
24289
|
+
_runStroke();
|
|
24290
|
+
_runFill();
|
|
24291
|
+
}
|
|
24292
|
+
this.afterRenderStep(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
|
|
24293
|
+
}
|
|
24294
|
+
draw(circle, renderService, drawContext, params) {
|
|
24295
|
+
const circleAttribute = getTheme(circle, params === null || params === void 0 ? void 0 : params.theme).circle;
|
|
24296
|
+
this._draw(circle, circleAttribute, false, drawContext, params);
|
|
24297
|
+
}
|
|
24298
|
+
}
|
|
24299
|
+
|
|
24300
|
+
function drawSegItem(ctx, curve, endPercent, params) {
|
|
24301
|
+
if (!curve.p1) {
|
|
24302
|
+
return;
|
|
24303
|
+
}
|
|
24304
|
+
const { offsetX = 0, offsetY = 0, offsetZ = 0 } = params || {};
|
|
24305
|
+
if (endPercent === 1) {
|
|
24306
|
+
if (curve.p2 && curve.p3) {
|
|
24307
|
+
ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ);
|
|
24308
|
+
}
|
|
24309
|
+
else {
|
|
24310
|
+
ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);
|
|
24311
|
+
}
|
|
24312
|
+
}
|
|
24313
|
+
else {
|
|
24314
|
+
if (curve.p2 && curve.p3) {
|
|
24315
|
+
const [curve1] = divideCubic(curve, endPercent);
|
|
24316
|
+
ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
|
|
24317
|
+
}
|
|
24318
|
+
else {
|
|
24319
|
+
const p = curve.getPointAt(endPercent);
|
|
24320
|
+
ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
|
|
24321
|
+
}
|
|
24322
|
+
}
|
|
24323
|
+
}
|
|
24324
|
+
|
|
24325
|
+
function drawEachCurve(path, curve, lastCurve, defined0, offsetX, offsetY, offsetZ) {
|
|
24326
|
+
var _a;
|
|
24327
|
+
let p0 = curve.p0;
|
|
24328
|
+
let newDefined0 = defined0;
|
|
24329
|
+
if (lastCurve && lastCurve.originP1 === lastCurve.originP2) {
|
|
24330
|
+
p0 = lastCurve.p0;
|
|
24331
|
+
}
|
|
24332
|
+
if (curve.defined) {
|
|
24333
|
+
if (!defined0) {
|
|
24057
24334
|
path.lineTo(p0.x + offsetX, p0.y + offsetY, offsetZ);
|
|
24058
24335
|
newDefined0 = !defined0;
|
|
24059
24336
|
}
|
|
@@ -25018,6 +25295,54 @@ class DefaultCanvasRectRender extends BaseRender {
|
|
|
25018
25295
|
}
|
|
25019
25296
|
}
|
|
25020
25297
|
|
|
25298
|
+
class DefaultCanvasRect3dRender extends Base3dRender {
|
|
25299
|
+
constructor() {
|
|
25300
|
+
super(...arguments);
|
|
25301
|
+
this.type = 'rect3d';
|
|
25302
|
+
this.numberType = RECT3D_NUMBER_TYPE;
|
|
25303
|
+
}
|
|
25304
|
+
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
25305
|
+
var _a, _b;
|
|
25306
|
+
const rectAttribute = getTheme(rect, params === null || params === void 0 ? void 0 : params.theme).rect;
|
|
25307
|
+
const { fill = rectAttribute.fill, stroke = rectAttribute.stroke, x1, y1, x: originX, y: originY, opacity = rectAttribute.opacity, fillOpacity = rectAttribute.fillOpacity, lineWidth = rectAttribute.lineWidth, strokeOpacity = rectAttribute.strokeOpacity, visible = rectAttribute.visible, drawStrokeWhenZeroWH = (_a = rectAttribute.drawStrokeWhenZeroWH) !== null && _a !== void 0 ? _a : false } = rect.attribute;
|
|
25308
|
+
let { width, height } = rect.attribute;
|
|
25309
|
+
width = (width !== null && width !== void 0 ? width : x1 - originX) || 0;
|
|
25310
|
+
height = (height !== null && height !== void 0 ? height : y1 - originY) || 0;
|
|
25311
|
+
const z = (_b = this.z) !== null && _b !== void 0 ? _b : 0;
|
|
25312
|
+
const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);
|
|
25313
|
+
const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH);
|
|
25314
|
+
const doFill = runFill(fill);
|
|
25315
|
+
const doStroke = runStroke(stroke, lineWidth);
|
|
25316
|
+
if (!(rect.valid && visible)) {
|
|
25317
|
+
return;
|
|
25318
|
+
}
|
|
25319
|
+
if (!(doFill || doStroke)) {
|
|
25320
|
+
return;
|
|
25321
|
+
}
|
|
25322
|
+
if (!(fVisible || sVisible || fillCb || strokeCb)) {
|
|
25323
|
+
return;
|
|
25324
|
+
}
|
|
25325
|
+
const { light } = drawContext.stage || {};
|
|
25326
|
+
const face3d = rect.findFace();
|
|
25327
|
+
if (fill !== false) {
|
|
25328
|
+
context.setCommonStyle(rect, rect.attribute, x, y, rectAttribute);
|
|
25329
|
+
let fc = fill;
|
|
25330
|
+
if (typeof fc !== 'string') {
|
|
25331
|
+
fc = 'black';
|
|
25332
|
+
}
|
|
25333
|
+
this.fill(x, y, z, face3d, null, fc, context, light, null, null, fillCb);
|
|
25334
|
+
}
|
|
25335
|
+
if (stroke !== false) {
|
|
25336
|
+
context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute);
|
|
25337
|
+
this.stroke(x, y, z, face3d, context);
|
|
25338
|
+
}
|
|
25339
|
+
}
|
|
25340
|
+
draw(rect, renderService, drawContext) {
|
|
25341
|
+
const rectAttribute = getTheme(rect).rect;
|
|
25342
|
+
this._draw(rect, rectAttribute, false, drawContext);
|
|
25343
|
+
}
|
|
25344
|
+
}
|
|
25345
|
+
|
|
25021
25346
|
class DefaultCanvasSymbolRender extends BaseRender {
|
|
25022
25347
|
constructor(graphicRenderContributions) {
|
|
25023
25348
|
super();
|
|
@@ -25588,6 +25913,42 @@ class DefaultCanvasPolygonRender extends BaseRender {
|
|
|
25588
25913
|
}
|
|
25589
25914
|
}
|
|
25590
25915
|
|
|
25916
|
+
class DefaultCanvasPyramid3dRender extends Base3dRender {
|
|
25917
|
+
constructor() {
|
|
25918
|
+
super(...arguments);
|
|
25919
|
+
this.type = 'pyramid3d';
|
|
25920
|
+
this.numberType = PYRAMID3D_NUMBER_TYPE;
|
|
25921
|
+
}
|
|
25922
|
+
drawShape(pyramid3d, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
25923
|
+
var _a;
|
|
25924
|
+
const pyramidAttribute = getTheme(pyramid3d, params === null || params === void 0 ? void 0 : params.theme).polygon;
|
|
25925
|
+
const { fill = pyramidAttribute.fill, stroke = pyramidAttribute.stroke, face = [true, true, true, true, true, true] } = pyramid3d.attribute;
|
|
25926
|
+
const z = (_a = this.z) !== null && _a !== void 0 ? _a : 0;
|
|
25927
|
+
const data = this.valid(pyramid3d, pyramidAttribute, fillCb, strokeCb);
|
|
25928
|
+
if (!data) {
|
|
25929
|
+
return;
|
|
25930
|
+
}
|
|
25931
|
+
const { light } = drawContext.stage || {};
|
|
25932
|
+
const face3d = pyramid3d.findFace();
|
|
25933
|
+
if (fill !== false) {
|
|
25934
|
+
context.setCommonStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute);
|
|
25935
|
+
let fc = fill;
|
|
25936
|
+
if (typeof fc !== 'string') {
|
|
25937
|
+
fc = 'black';
|
|
25938
|
+
}
|
|
25939
|
+
this.fill(x, y, z, face3d, face, fc, context, light, pyramid3d, pyramidAttribute, fillCb);
|
|
25940
|
+
}
|
|
25941
|
+
if (stroke !== false) {
|
|
25942
|
+
context.setStrokeStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute);
|
|
25943
|
+
this.stroke(x, y, z, face3d, context);
|
|
25944
|
+
}
|
|
25945
|
+
}
|
|
25946
|
+
draw(pyramid3d, renderService, drawContext) {
|
|
25947
|
+
const pyramid3dAttribute = getTheme(pyramid3d).polygon;
|
|
25948
|
+
this._draw(pyramid3d, pyramid3dAttribute, false, drawContext);
|
|
25949
|
+
}
|
|
25950
|
+
}
|
|
25951
|
+
|
|
25591
25952
|
const repeatStr = ['', 'repeat-x', 'repeat-y', 'repeat'];
|
|
25592
25953
|
function resolveImageRepeatMode(repeatX, repeatY) {
|
|
25593
25954
|
let repeat = 0;
|
|
@@ -29188,609 +29549,248 @@ class DefaultCanvasStarRender extends BaseRender {
|
|
|
29188
29549
|
const starAttribute = getTheme(star, params === null || params === void 0 ? void 0 : params.theme).star;
|
|
29189
29550
|
const { x: originX = starAttribute.x, y: originY = starAttribute.y, fillStrokeOrder = starAttribute.fillStrokeOrder } = star.attribute;
|
|
29190
29551
|
const data = this.valid(star, starAttribute, fillCb, strokeCb);
|
|
29191
|
-
if (!data) {
|
|
29192
|
-
return;
|
|
29193
|
-
}
|
|
29194
|
-
const { fVisible, sVisible, doFill, doStroke } = data;
|
|
29195
|
-
const points = star.getCachedPoints();
|
|
29196
|
-
context.beginPath();
|
|
29197
|
-
if (points && points.length) {
|
|
29198
|
-
points.forEach((point, index) => {
|
|
29199
|
-
if (index === 0) {
|
|
29200
|
-
context.moveTo(x + point.x, y + point.y);
|
|
29201
|
-
}
|
|
29202
|
-
else {
|
|
29203
|
-
context.lineTo(x + point.x, y + point.y);
|
|
29204
|
-
}
|
|
29205
|
-
});
|
|
29206
|
-
}
|
|
29207
|
-
context.closePath();
|
|
29208
|
-
context.setShadowBlendStyle && context.setShadowBlendStyle(star, star.attribute, starAttribute);
|
|
29209
|
-
this.beforeRenderStep(star, context, x, y, doFill, doStroke, fVisible, sVisible, starAttribute, drawContext, fillCb, strokeCb);
|
|
29210
|
-
const _runFill = () => {
|
|
29211
|
-
if (doFill) {
|
|
29212
|
-
if (fillCb) {
|
|
29213
|
-
fillCb(context, star.attribute, starAttribute);
|
|
29214
|
-
}
|
|
29215
|
-
else if (fVisible) {
|
|
29216
|
-
context.setCommonStyle(star, star.attribute, originX - x, originY - y, starAttribute);
|
|
29217
|
-
context.fill();
|
|
29218
|
-
}
|
|
29219
|
-
}
|
|
29220
|
-
};
|
|
29221
|
-
const _runStroke = () => {
|
|
29222
|
-
if (doStroke) {
|
|
29223
|
-
if (strokeCb) {
|
|
29224
|
-
strokeCb(context, star.attribute, starAttribute);
|
|
29225
|
-
}
|
|
29226
|
-
else if (sVisible) {
|
|
29227
|
-
context.setStrokeStyle(star, star.attribute, originX - x, originY - y, starAttribute);
|
|
29228
|
-
context.stroke();
|
|
29229
|
-
}
|
|
29230
|
-
}
|
|
29231
|
-
};
|
|
29232
|
-
if (!fillStrokeOrder) {
|
|
29233
|
-
_runFill();
|
|
29234
|
-
_runStroke();
|
|
29235
|
-
}
|
|
29236
|
-
else {
|
|
29237
|
-
_runStroke();
|
|
29238
|
-
_runFill();
|
|
29239
|
-
}
|
|
29240
|
-
this.afterRenderStep(star, context, x, y, doFill, doStroke, fVisible, sVisible, starAttribute, drawContext, fillCb, strokeCb);
|
|
29241
|
-
}
|
|
29242
|
-
draw(star, renderService, drawContext, params) {
|
|
29243
|
-
const starAttribute = getTheme(star, params === null || params === void 0 ? void 0 : params.theme).star;
|
|
29244
|
-
this._draw(star, starAttribute, false, drawContext, params);
|
|
29245
|
-
}
|
|
29246
|
-
}
|
|
29247
|
-
|
|
29248
|
-
const loadedStarModuleContexts = new WeakSet();
|
|
29249
|
-
function bindStarRenderModule({ bind }) {
|
|
29250
|
-
if (isBindingContextLoaded(loadedStarModuleContexts, bind)) {
|
|
29251
|
-
return;
|
|
29252
|
-
}
|
|
29253
|
-
bind(DefaultCanvasStarRender)
|
|
29254
|
-
.toDynamicValue(({ container }) => new DefaultCanvasStarRender(createContributionProvider(StarRenderContribution, container)))
|
|
29255
|
-
.inSingletonScope();
|
|
29256
|
-
bind(StarRender).toService(DefaultCanvasStarRender);
|
|
29257
|
-
bind(GraphicRender).toService(StarRender);
|
|
29258
|
-
bindContributionProvider(bind, StarRenderContribution);
|
|
29259
|
-
}
|
|
29260
|
-
const starModule = bindStarRenderModule;
|
|
29261
|
-
|
|
29262
|
-
class DefaultCanvasGlyphRender {
|
|
29263
|
-
constructor() {
|
|
29264
|
-
this.numberType = GLYPH_NUMBER_TYPE;
|
|
29265
|
-
}
|
|
29266
|
-
reInit() {
|
|
29267
|
-
return;
|
|
29268
|
-
}
|
|
29269
|
-
drawShape(glyph, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
29270
|
-
if (!drawContext.drawContribution) {
|
|
29271
|
-
return;
|
|
29272
|
-
}
|
|
29273
|
-
glyph.getSubGraphic().forEach(item => {
|
|
29274
|
-
const renderer = drawContext.drawContribution.getRenderContribution(item);
|
|
29275
|
-
if (renderer && renderer.drawShape) {
|
|
29276
|
-
renderer.drawShape(item, context, x, y, drawContext, params, fillCb, strokeCb);
|
|
29277
|
-
}
|
|
29278
|
-
});
|
|
29279
|
-
}
|
|
29280
|
-
draw(glyph, renderService, drawContext, params) {
|
|
29281
|
-
const { context } = drawContext;
|
|
29282
|
-
if (!context) {
|
|
29283
|
-
return;
|
|
29284
|
-
}
|
|
29285
|
-
context.highPerformanceSave();
|
|
29286
|
-
if (!drawContext.drawContribution) {
|
|
29287
|
-
return;
|
|
29288
|
-
}
|
|
29289
|
-
const glyphTheme = getTheme(glyph);
|
|
29290
|
-
const subGraphic = glyph.getSubGraphic();
|
|
29291
|
-
subGraphic.length &&
|
|
29292
|
-
subGraphic.forEach(g => {
|
|
29293
|
-
drawContext.drawContribution.renderItem(g, drawContext, { theme: glyphTheme });
|
|
29294
|
-
});
|
|
29295
|
-
context.highPerformanceRestore();
|
|
29296
|
-
}
|
|
29297
|
-
}
|
|
29298
|
-
|
|
29299
|
-
const loadedGlyphModuleContexts = new WeakSet();
|
|
29300
|
-
function bindGlyphRenderModule({ bind }) {
|
|
29301
|
-
if (isBindingContextLoaded(loadedGlyphModuleContexts, bind)) {
|
|
29302
|
-
return;
|
|
29303
|
-
}
|
|
29304
|
-
bind(DefaultCanvasGlyphRender)
|
|
29305
|
-
.toDynamicValue(() => new DefaultCanvasGlyphRender())
|
|
29306
|
-
.inSingletonScope();
|
|
29307
|
-
bind(GlyphRender).toService(DefaultCanvasGlyphRender);
|
|
29308
|
-
bind(GraphicRender).toService(GlyphRender);
|
|
29309
|
-
}
|
|
29310
|
-
const glyphModule = bindGlyphRenderModule;
|
|
29311
|
-
|
|
29312
|
-
class DefaultCanvasRichTextRender extends BaseRender {
|
|
29313
|
-
constructor() {
|
|
29314
|
-
super();
|
|
29315
|
-
this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
29316
|
-
this.builtinContributions = [defaultTextBackgroundRenderContribution];
|
|
29317
|
-
this.init();
|
|
29318
|
-
}
|
|
29319
|
-
drawShape(richtext, context, x, y, drawContext) {
|
|
29320
|
-
const richtextAttribute = getTheme(richtext).richtext;
|
|
29321
|
-
const { strokeOpacity = richtextAttribute.strokeOpacity, opacity = richtextAttribute.opacity, fillOpacity = richtextAttribute.fillOpacity, visible = richtextAttribute.visible } = richtext.attribute;
|
|
29322
|
-
if (!(richtext.valid && visible)) {
|
|
29323
|
-
return;
|
|
29324
|
-
}
|
|
29325
|
-
const fVisible = fillVisible(opacity, fillOpacity, true);
|
|
29326
|
-
const sVisible = fillVisible(opacity, strokeOpacity, true);
|
|
29327
|
-
if (!fVisible) {
|
|
29328
|
-
return;
|
|
29329
|
-
}
|
|
29330
|
-
context.setShadowBlendStyle && context.setShadowBlendStyle(richtext, richtext.attribute, richtextAttribute);
|
|
29331
|
-
context.translate(x, y);
|
|
29332
|
-
this.beforeRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
29333
|
-
const frame = richtext.getFrameCache();
|
|
29334
|
-
frame.draw(context, this.drawIcon);
|
|
29335
|
-
this.afterRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
29336
|
-
}
|
|
29337
|
-
drawIcon(icon, context, x, y, baseline) {
|
|
29338
|
-
var _a;
|
|
29339
|
-
const richtextIconAttribute = getTheme(icon).richtextIcon;
|
|
29340
|
-
const { width = richtextIconAttribute.width, height = richtextIconAttribute.height, opacity = richtextIconAttribute.opacity, image: url, backgroundFill = richtextIconAttribute.backgroundFill, backgroundFillOpacity = richtextIconAttribute.backgroundFillOpacity, backgroundStroke = richtextIconAttribute.backgroundStroke, backgroundStrokeOpacity = richtextIconAttribute.backgroundStrokeOpacity, backgroundRadius = richtextIconAttribute.backgroundRadius, margin } = icon.attribute;
|
|
29341
|
-
const { backgroundWidth = width, backgroundHeight = height } = icon.attribute;
|
|
29342
|
-
if (margin) {
|
|
29343
|
-
x += icon._marginArray[3];
|
|
29344
|
-
y += icon._marginArray[0];
|
|
29345
|
-
}
|
|
29346
|
-
if (icon._hovered) {
|
|
29347
|
-
const expandX = (backgroundWidth - width) / 2;
|
|
29348
|
-
const expandY = (backgroundHeight - height) / 2;
|
|
29349
|
-
if (backgroundRadius === 0) {
|
|
29350
|
-
context.beginPath();
|
|
29351
|
-
context.rect(x - expandX, y - expandY, backgroundWidth, backgroundHeight);
|
|
29352
|
-
}
|
|
29353
|
-
else {
|
|
29354
|
-
context.beginPath();
|
|
29355
|
-
createRectPath(context, x - expandX, y - expandY, backgroundWidth, backgroundHeight, backgroundRadius, true);
|
|
29356
|
-
}
|
|
29357
|
-
if (backgroundFill) {
|
|
29358
|
-
context.globalAlpha = backgroundFillOpacity;
|
|
29359
|
-
context.fillStyle = backgroundFill;
|
|
29360
|
-
context.fill();
|
|
29361
|
-
}
|
|
29362
|
-
if (backgroundStroke) {
|
|
29363
|
-
context.globalAlpha = backgroundStrokeOpacity;
|
|
29364
|
-
context.strokeStyle = backgroundStroke;
|
|
29365
|
-
context.stroke();
|
|
29366
|
-
}
|
|
29367
|
-
}
|
|
29368
|
-
const res = url && ((_a = icon === null || icon === void 0 ? void 0 : icon.resources) === null || _a === void 0 ? void 0 : _a.get(url));
|
|
29369
|
-
if (!res || res.state !== 'success') {
|
|
29370
|
-
return;
|
|
29371
|
-
}
|
|
29372
|
-
context.globalAlpha = opacity;
|
|
29373
|
-
context.drawImage(res.data, x, y, width, height);
|
|
29374
|
-
}
|
|
29375
|
-
draw(richtext, renderService, drawContext) {
|
|
29376
|
-
const richtextAttribute = getTheme(richtext).richtext;
|
|
29377
|
-
this._draw(richtext, richtextAttribute, false, drawContext);
|
|
29378
|
-
}
|
|
29379
|
-
}
|
|
29380
|
-
|
|
29381
|
-
const loadedRichtextModuleContexts = new WeakSet();
|
|
29382
|
-
function bindRichtextRenderModule({ bind }) {
|
|
29383
|
-
if (isBindingContextLoaded(loadedRichtextModuleContexts, bind)) {
|
|
29384
|
-
return;
|
|
29385
|
-
}
|
|
29386
|
-
bind(DefaultCanvasRichTextRender)
|
|
29387
|
-
.toDynamicValue(() => new DefaultCanvasRichTextRender())
|
|
29388
|
-
.inSingletonScope();
|
|
29389
|
-
bind(RichTextRender).toService(DefaultCanvasRichTextRender);
|
|
29390
|
-
bind(GraphicRender).toService(RichTextRender);
|
|
29391
|
-
}
|
|
29392
|
-
const richtextModule = bindRichtextRenderModule;
|
|
29393
|
-
|
|
29394
|
-
const loadedImageModuleContexts = new WeakSet();
|
|
29395
|
-
function bindImageRenderModule({ bind }) {
|
|
29396
|
-
if (isBindingContextLoaded(loadedImageModuleContexts, bind)) {
|
|
29397
|
-
return;
|
|
29398
|
-
}
|
|
29399
|
-
bind(ImageRender)
|
|
29400
|
-
.toDynamicValue(({ container }) => new DefaultCanvasImageRender(createContributionProvider(ImageRenderContribution, container)))
|
|
29401
|
-
.inSingletonScope();
|
|
29402
|
-
bind(GraphicRender).toService(ImageRender);
|
|
29403
|
-
bind(ImageRenderContribution).toService(DefaultBaseInteractiveRenderContribution);
|
|
29404
|
-
bindContributionProvider(bind, ImageRenderContribution);
|
|
29405
|
-
}
|
|
29406
|
-
const imageModule = bindImageRenderModule;
|
|
29407
|
-
|
|
29408
|
-
class Base3dRender extends BaseRender {
|
|
29409
|
-
stroke(x, y, z, face3d, context) {
|
|
29410
|
-
const vertices = face3d.vertices;
|
|
29411
|
-
face3d.edges.forEach(edge => {
|
|
29412
|
-
const p1 = vertices[edge[0]];
|
|
29413
|
-
const v1 = {
|
|
29414
|
-
x: x + p1[0],
|
|
29415
|
-
y: y + p1[1],
|
|
29416
|
-
z: z + p1[2]
|
|
29417
|
-
};
|
|
29418
|
-
const p2 = vertices[edge[1]];
|
|
29419
|
-
const v2 = {
|
|
29420
|
-
x: x + p2[0],
|
|
29421
|
-
y: y + p2[1],
|
|
29422
|
-
z: z + p2[2]
|
|
29423
|
-
};
|
|
29424
|
-
context.beginPath();
|
|
29425
|
-
context.moveTo(v1.x, v1.y, v1.z);
|
|
29426
|
-
context.lineTo(v2.x, v2.y, v2.z);
|
|
29427
|
-
context.stroke();
|
|
29428
|
-
});
|
|
29429
|
-
}
|
|
29430
|
-
fill(x, y, z, face3d, faces, fillColor, context, light, graphic3d, graphic3dAttribute, fillCb) {
|
|
29431
|
-
const rgbArray = ColorStore.Get(fillColor, ColorType.Color255);
|
|
29432
|
-
const vertices = face3d.vertices;
|
|
29433
|
-
const viewdVerticesZ = vertices.map(v => {
|
|
29434
|
-
return context.view(v[0], v[1], v[2])[2];
|
|
29435
|
-
});
|
|
29436
|
-
const sortFace = [];
|
|
29437
|
-
face3d.polygons.forEach((p, i) => {
|
|
29438
|
-
if (faces && !faces[i]) {
|
|
29439
|
-
return;
|
|
29440
|
-
}
|
|
29441
|
-
sortFace.push({
|
|
29442
|
-
faceIdx: i,
|
|
29443
|
-
polygon: p
|
|
29444
|
-
});
|
|
29445
|
-
const { polygon } = p;
|
|
29446
|
-
const z1 = viewdVerticesZ[polygon[0]];
|
|
29447
|
-
const z2 = viewdVerticesZ[polygon[1]];
|
|
29448
|
-
const z3 = viewdVerticesZ[polygon[2]];
|
|
29449
|
-
const z4 = viewdVerticesZ[polygon[3]];
|
|
29450
|
-
p.ave_z = z1 + z2 + z3 + z4;
|
|
29451
|
-
});
|
|
29452
|
-
sortFace.sort((a, b) => b.polygon.ave_z - a.polygon.ave_z);
|
|
29453
|
-
sortFace.forEach(item => {
|
|
29454
|
-
const { polygon, normal } = item.polygon;
|
|
29455
|
-
const p1 = vertices[polygon[0]];
|
|
29456
|
-
const p2 = vertices[polygon[1]];
|
|
29457
|
-
const p3 = vertices[polygon[2]];
|
|
29458
|
-
const p4 = vertices[polygon[3]];
|
|
29459
|
-
const v1 = {
|
|
29460
|
-
x: x + p1[0],
|
|
29461
|
-
y: y + p1[1],
|
|
29462
|
-
z: z + p1[2]
|
|
29463
|
-
};
|
|
29464
|
-
const v2 = {
|
|
29465
|
-
x: x + p2[0],
|
|
29466
|
-
y: y + p2[1],
|
|
29467
|
-
z: z + p2[2]
|
|
29468
|
-
};
|
|
29469
|
-
const v3 = {
|
|
29470
|
-
x: x + p3[0],
|
|
29471
|
-
y: y + p3[1],
|
|
29472
|
-
z: z + p3[2]
|
|
29473
|
-
};
|
|
29474
|
-
const v4 = {
|
|
29475
|
-
x: x + p4[0],
|
|
29476
|
-
y: y + p4[1],
|
|
29477
|
-
z: z + p4[2]
|
|
29478
|
-
};
|
|
29479
|
-
context.beginPath();
|
|
29480
|
-
context.moveTo(v1.x, v1.y, v1.z);
|
|
29481
|
-
context.lineTo(v2.x, v2.y, v2.z);
|
|
29482
|
-
context.lineTo(v3.x, v3.y, v3.z);
|
|
29483
|
-
context.lineTo(v4.x, v4.y, v4.z);
|
|
29484
|
-
context.closePath();
|
|
29485
|
-
if (fillCb) {
|
|
29486
|
-
fillCb(context, graphic3d && graphic3d.attribute, graphic3dAttribute);
|
|
29487
|
-
}
|
|
29488
|
-
else {
|
|
29489
|
-
context.fillStyle = light ? light.computeColor(normal, rgbArray) : fillColor;
|
|
29490
|
-
context.fill();
|
|
29491
|
-
}
|
|
29492
|
-
});
|
|
29493
|
-
}
|
|
29494
|
-
}
|
|
29495
|
-
|
|
29496
|
-
class DefaultCanvasRect3dRender extends Base3dRender {
|
|
29497
|
-
constructor() {
|
|
29498
|
-
super(...arguments);
|
|
29499
|
-
this.type = 'rect3d';
|
|
29500
|
-
this.numberType = RECT3D_NUMBER_TYPE;
|
|
29501
|
-
}
|
|
29502
|
-
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
29503
|
-
var _a, _b;
|
|
29504
|
-
const rectAttribute = getTheme(rect, params === null || params === void 0 ? void 0 : params.theme).rect;
|
|
29505
|
-
const { fill = rectAttribute.fill, stroke = rectAttribute.stroke, x1, y1, x: originX, y: originY, opacity = rectAttribute.opacity, fillOpacity = rectAttribute.fillOpacity, lineWidth = rectAttribute.lineWidth, strokeOpacity = rectAttribute.strokeOpacity, visible = rectAttribute.visible, drawStrokeWhenZeroWH = (_a = rectAttribute.drawStrokeWhenZeroWH) !== null && _a !== void 0 ? _a : false } = rect.attribute;
|
|
29506
|
-
let { width, height } = rect.attribute;
|
|
29507
|
-
width = (width !== null && width !== void 0 ? width : x1 - originX) || 0;
|
|
29508
|
-
height = (height !== null && height !== void 0 ? height : y1 - originY) || 0;
|
|
29509
|
-
const z = (_b = this.z) !== null && _b !== void 0 ? _b : 0;
|
|
29510
|
-
const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);
|
|
29511
|
-
const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH);
|
|
29512
|
-
const doFill = runFill(fill);
|
|
29513
|
-
const doStroke = runStroke(stroke, lineWidth);
|
|
29514
|
-
if (!(rect.valid && visible)) {
|
|
29515
|
-
return;
|
|
29516
|
-
}
|
|
29517
|
-
if (!(doFill || doStroke)) {
|
|
29518
|
-
return;
|
|
29519
|
-
}
|
|
29520
|
-
if (!(fVisible || sVisible || fillCb || strokeCb)) {
|
|
29521
|
-
return;
|
|
29522
|
-
}
|
|
29523
|
-
const { light } = drawContext.stage || {};
|
|
29524
|
-
const face3d = rect.findFace();
|
|
29525
|
-
if (fill !== false) {
|
|
29526
|
-
context.setCommonStyle(rect, rect.attribute, x, y, rectAttribute);
|
|
29527
|
-
let fc = fill;
|
|
29528
|
-
if (typeof fc !== 'string') {
|
|
29529
|
-
fc = 'black';
|
|
29530
|
-
}
|
|
29531
|
-
this.fill(x, y, z, face3d, null, fc, context, light, null, null, fillCb);
|
|
29532
|
-
}
|
|
29533
|
-
if (stroke !== false) {
|
|
29534
|
-
context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute);
|
|
29535
|
-
this.stroke(x, y, z, face3d, context);
|
|
29536
|
-
}
|
|
29537
|
-
}
|
|
29538
|
-
draw(rect, renderService, drawContext) {
|
|
29539
|
-
const rectAttribute = getTheme(rect).rect;
|
|
29540
|
-
this._draw(rect, rectAttribute, false, drawContext);
|
|
29541
|
-
}
|
|
29542
|
-
}
|
|
29543
|
-
|
|
29544
|
-
const loadedRect3dModuleContexts = new WeakSet();
|
|
29545
|
-
function bindRect3dRenderModule({ bind }) {
|
|
29546
|
-
if (isBindingContextLoaded(loadedRect3dModuleContexts, bind)) {
|
|
29547
|
-
return;
|
|
29548
|
-
}
|
|
29549
|
-
bind(DefaultCanvasRect3dRender)
|
|
29550
|
-
.toDynamicValue(() => new DefaultCanvasRect3dRender())
|
|
29551
|
-
.inSingletonScope();
|
|
29552
|
-
bind(Rect3DRender).toService(DefaultCanvasRect3dRender);
|
|
29553
|
-
bind(GraphicRender).toService(Rect3DRender);
|
|
29554
|
-
}
|
|
29555
|
-
const rect3dModule = bindRect3dRenderModule;
|
|
29556
|
-
|
|
29557
|
-
function drawArcPath(arc, context, cx, cy, z, outerRadius, innerRadius) {
|
|
29558
|
-
const { startAngle, endAngle } = arc.getParsedAngle();
|
|
29559
|
-
const deltaAngle = abs(endAngle - startAngle);
|
|
29560
|
-
const clockwise = endAngle > startAngle;
|
|
29561
|
-
let collapsedToLine = false;
|
|
29562
|
-
if (outerRadius < innerRadius) {
|
|
29563
|
-
const temp = outerRadius;
|
|
29564
|
-
outerRadius = innerRadius;
|
|
29565
|
-
innerRadius = temp;
|
|
29566
|
-
}
|
|
29567
|
-
if (outerRadius <= epsilon) {
|
|
29568
|
-
context.moveTo(cx, cy, z);
|
|
29569
|
-
}
|
|
29570
|
-
else if (deltaAngle >= pi2 - epsilon) {
|
|
29571
|
-
context.moveTo(cx + outerRadius * cos(startAngle), cy + outerRadius * sin(startAngle), z);
|
|
29572
|
-
context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise, z);
|
|
29573
|
-
if (innerRadius > epsilon) {
|
|
29574
|
-
context.moveTo(cx + innerRadius * cos(endAngle), cy + innerRadius * sin(endAngle), z);
|
|
29575
|
-
context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise, z);
|
|
29576
|
-
}
|
|
29577
|
-
}
|
|
29578
|
-
else {
|
|
29579
|
-
const { outerDeltaAngle, innerDeltaAngle, outerStartAngle, outerEndAngle, innerEndAngle, innerStartAngle } = arc.getParsePadAngle(startAngle, endAngle);
|
|
29580
|
-
const xors = outerRadius * cos(outerStartAngle);
|
|
29581
|
-
const yors = outerRadius * sin(outerStartAngle);
|
|
29582
|
-
const xire = innerRadius * cos(innerEndAngle);
|
|
29583
|
-
const yire = innerRadius * sin(innerEndAngle);
|
|
29584
|
-
if (outerDeltaAngle < 0.001) {
|
|
29585
|
-
collapsedToLine = true;
|
|
29586
|
-
}
|
|
29587
|
-
else {
|
|
29588
|
-
context.moveTo(cx + xors, cy + yors, z);
|
|
29589
|
-
context.arc(cx, cy, outerRadius, outerStartAngle, outerEndAngle, !clockwise, z);
|
|
29590
|
-
}
|
|
29591
|
-
if (!(innerRadius > epsilon) || innerDeltaAngle < 0.001) {
|
|
29592
|
-
context.lineTo(cx + xire, cy + yire, z);
|
|
29593
|
-
collapsedToLine = true;
|
|
29594
|
-
}
|
|
29595
|
-
else {
|
|
29596
|
-
context.lineTo(cx + xire, cy + yire, z);
|
|
29597
|
-
context.arc(cx, cy, innerRadius, innerEndAngle, innerStartAngle, clockwise, z);
|
|
29598
|
-
}
|
|
29599
|
-
}
|
|
29600
|
-
context.closePath();
|
|
29601
|
-
return collapsedToLine;
|
|
29602
|
-
}
|
|
29603
|
-
function drawInnerOuterArcPath(arc, context, cx, cy, z1, z2, radius, getParsePadAngle) {
|
|
29604
|
-
const { startAngle, endAngle } = arc.getParsedAngle();
|
|
29605
|
-
const deltaAngle = abs(endAngle - startAngle);
|
|
29606
|
-
const clockwise = endAngle > startAngle;
|
|
29607
|
-
let collapsedToLine = false;
|
|
29608
|
-
if (radius <= epsilon) {
|
|
29609
|
-
context.moveTo(cx, cy, z1);
|
|
29610
|
-
}
|
|
29611
|
-
else if (deltaAngle >= pi2 - epsilon) {
|
|
29612
|
-
context.moveTo(cx + radius * cos(startAngle), cy + radius * sin(startAngle), z1);
|
|
29613
|
-
context.arc(cx, cy, radius, startAngle, endAngle, !clockwise, z1);
|
|
29614
|
-
context.lineTo(cx + radius * cos(endAngle), cy + radius * sin(endAngle), z2);
|
|
29615
|
-
context.arc(cx, cy, radius, endAngle, startAngle, clockwise, z2);
|
|
29616
|
-
}
|
|
29617
|
-
else {
|
|
29618
|
-
const { innerouterDeltaAngle, innerouterStartAngle, innerouterEndAngle } = getParsePadAngle(startAngle, endAngle);
|
|
29619
|
-
const xors = radius * cos(innerouterStartAngle);
|
|
29620
|
-
const yors = radius * sin(innerouterStartAngle);
|
|
29621
|
-
const xore = radius * cos(innerouterEndAngle);
|
|
29622
|
-
const yore = radius * sin(innerouterEndAngle);
|
|
29623
|
-
if (innerouterDeltaAngle < 0.001) {
|
|
29624
|
-
collapsedToLine = true;
|
|
29625
|
-
}
|
|
29626
|
-
else {
|
|
29627
|
-
context.moveTo(cx + xors, cy + yors, z1);
|
|
29628
|
-
context.arc(cx, cy, radius, innerouterStartAngle, innerouterEndAngle, !clockwise, z1);
|
|
29629
|
-
context.lineTo(cx + xore, cy + yore, z2);
|
|
29630
|
-
context.arc(cx, cy, radius, innerouterEndAngle, innerouterStartAngle, clockwise, z2);
|
|
29631
|
-
}
|
|
29632
|
-
}
|
|
29633
|
-
context.closePath();
|
|
29634
|
-
return collapsedToLine;
|
|
29635
|
-
}
|
|
29636
|
-
class DefaultCanvasArc3DRender extends BaseRender {
|
|
29637
|
-
constructor() {
|
|
29638
|
-
super(...arguments);
|
|
29639
|
-
this.numberType = ARC3D_NUMBER_TYPE;
|
|
29640
|
-
}
|
|
29641
|
-
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
29642
|
-
var _a;
|
|
29643
|
-
const arcAttribute = getTheme(arc, params === null || params === void 0 ? void 0 : params.theme).arc;
|
|
29644
|
-
const { fill = arcAttribute.fill } = arc.attribute;
|
|
29645
|
-
const data = this.valid(arc, arcAttribute, fillCb, strokeCb);
|
|
29646
|
-
if (!data) {
|
|
29647
|
-
return;
|
|
29648
|
-
}
|
|
29649
|
-
const { fVisible, sVisible, doFill, doStroke } = data;
|
|
29650
|
-
const z = (_a = this.z) !== null && _a !== void 0 ? _a : 0;
|
|
29651
|
-
const { outerPadding = arcAttribute.outerPadding, innerPadding = arcAttribute.innerPadding, height = 10 } = arc.attribute;
|
|
29652
|
-
let { outerRadius = arcAttribute.outerRadius, innerRadius = arcAttribute.innerRadius } = arc.attribute;
|
|
29653
|
-
outerRadius += outerPadding;
|
|
29654
|
-
innerRadius -= innerPadding;
|
|
29655
|
-
const rgbArray = ColorStore.Get(fill, ColorType.Color255);
|
|
29656
|
-
const { light } = drawContext.stage || {};
|
|
29657
|
-
const face = drawContext.hack_pieFace;
|
|
29658
|
-
const z_face = {
|
|
29659
|
-
top: z,
|
|
29660
|
-
bottom: z + height
|
|
29661
|
-
};
|
|
29662
|
-
const n_face = {
|
|
29663
|
-
top: [0, 1, 0],
|
|
29664
|
-
bottom: [0, -1, 0],
|
|
29665
|
-
outside: [1, 0, -1],
|
|
29666
|
-
inside: [1, 0, -1]
|
|
29667
|
-
};
|
|
29668
|
-
if (face === 'bottom' || face === 'top') {
|
|
29669
|
-
context.beginPath();
|
|
29670
|
-
drawArcPath(arc, context, x, y, z_face[face], outerRadius, innerRadius);
|
|
29671
|
-
context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute);
|
|
29672
|
-
if (doFill) {
|
|
29673
|
-
if (fillCb) {
|
|
29674
|
-
fillCb(context, arc.attribute, arcAttribute);
|
|
29675
|
-
}
|
|
29676
|
-
else if (fVisible) {
|
|
29677
|
-
context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute);
|
|
29678
|
-
context.fillStyle = light ? light.computeColor(n_face[face], rgbArray) : fill;
|
|
29679
|
-
context.fill();
|
|
29680
|
-
}
|
|
29681
|
-
}
|
|
29682
|
-
if (doStroke) {
|
|
29683
|
-
if (strokeCb) {
|
|
29684
|
-
strokeCb(context, arc.attribute, arcAttribute);
|
|
29685
|
-
}
|
|
29686
|
-
else if (sVisible) {
|
|
29687
|
-
context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute);
|
|
29688
|
-
context.stroke();
|
|
29689
|
-
}
|
|
29690
|
-
}
|
|
29691
|
-
}
|
|
29692
|
-
else if (face === 'outside' || face === 'inside') {
|
|
29693
|
-
if (face === 'inside') {
|
|
29694
|
-
context.save();
|
|
29695
|
-
context.beginPath();
|
|
29696
|
-
context.arc(x, y, innerRadius, 0, pi2, true, z_face.top);
|
|
29697
|
-
context.clip();
|
|
29698
|
-
}
|
|
29699
|
-
context.beginPath();
|
|
29700
|
-
drawInnerOuterArcPath(arc, context, x, y, z_face.top, z_face.bottom, face === 'outside' ? outerRadius : innerRadius, (startAngle, endAngle) => {
|
|
29701
|
-
const { outerDeltaAngle, innerDeltaAngle, outerStartAngle, outerEndAngle, innerEndAngle, innerStartAngle } = arc.getParsePadAngle(startAngle, endAngle);
|
|
29702
|
-
if (face === 'outside') {
|
|
29703
|
-
return {
|
|
29704
|
-
innerouterDeltaAngle: outerDeltaAngle,
|
|
29705
|
-
innerouterEndAngle: outerEndAngle,
|
|
29706
|
-
innerouterStartAngle: outerStartAngle
|
|
29707
|
-
};
|
|
29552
|
+
if (!data) {
|
|
29553
|
+
return;
|
|
29554
|
+
}
|
|
29555
|
+
const { fVisible, sVisible, doFill, doStroke } = data;
|
|
29556
|
+
const points = star.getCachedPoints();
|
|
29557
|
+
context.beginPath();
|
|
29558
|
+
if (points && points.length) {
|
|
29559
|
+
points.forEach((point, index) => {
|
|
29560
|
+
if (index === 0) {
|
|
29561
|
+
context.moveTo(x + point.x, y + point.y);
|
|
29562
|
+
}
|
|
29563
|
+
else {
|
|
29564
|
+
context.lineTo(x + point.x, y + point.y);
|
|
29708
29565
|
}
|
|
29709
|
-
return {
|
|
29710
|
-
innerouterDeltaAngle: innerDeltaAngle,
|
|
29711
|
-
innerouterEndAngle: innerEndAngle,
|
|
29712
|
-
innerouterStartAngle: innerStartAngle
|
|
29713
|
-
};
|
|
29714
29566
|
});
|
|
29715
|
-
|
|
29567
|
+
}
|
|
29568
|
+
context.closePath();
|
|
29569
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(star, star.attribute, starAttribute);
|
|
29570
|
+
this.beforeRenderStep(star, context, x, y, doFill, doStroke, fVisible, sVisible, starAttribute, drawContext, fillCb, strokeCb);
|
|
29571
|
+
const _runFill = () => {
|
|
29716
29572
|
if (doFill) {
|
|
29717
29573
|
if (fillCb) {
|
|
29718
|
-
fillCb(context,
|
|
29574
|
+
fillCb(context, star.attribute, starAttribute);
|
|
29719
29575
|
}
|
|
29720
29576
|
else if (fVisible) {
|
|
29721
|
-
context.setCommonStyle(
|
|
29722
|
-
context.fillStyle = light ? light.computeColor(n_face[face], rgbArray) : fill;
|
|
29577
|
+
context.setCommonStyle(star, star.attribute, originX - x, originY - y, starAttribute);
|
|
29723
29578
|
context.fill();
|
|
29724
29579
|
}
|
|
29725
29580
|
}
|
|
29581
|
+
};
|
|
29582
|
+
const _runStroke = () => {
|
|
29726
29583
|
if (doStroke) {
|
|
29727
29584
|
if (strokeCb) {
|
|
29728
|
-
strokeCb(context,
|
|
29585
|
+
strokeCb(context, star.attribute, starAttribute);
|
|
29729
29586
|
}
|
|
29730
29587
|
else if (sVisible) {
|
|
29731
|
-
context.setStrokeStyle(
|
|
29588
|
+
context.setStrokeStyle(star, star.attribute, originX - x, originY - y, starAttribute);
|
|
29732
29589
|
context.stroke();
|
|
29733
29590
|
}
|
|
29734
29591
|
}
|
|
29735
|
-
|
|
29736
|
-
|
|
29737
|
-
|
|
29592
|
+
};
|
|
29593
|
+
if (!fillStrokeOrder) {
|
|
29594
|
+
_runFill();
|
|
29595
|
+
_runStroke();
|
|
29596
|
+
}
|
|
29597
|
+
else {
|
|
29598
|
+
_runStroke();
|
|
29599
|
+
_runFill();
|
|
29738
29600
|
}
|
|
29601
|
+
this.afterRenderStep(star, context, x, y, doFill, doStroke, fVisible, sVisible, starAttribute, drawContext, fillCb, strokeCb);
|
|
29739
29602
|
}
|
|
29740
|
-
draw(
|
|
29741
|
-
const
|
|
29742
|
-
this._draw(
|
|
29603
|
+
draw(star, renderService, drawContext, params) {
|
|
29604
|
+
const starAttribute = getTheme(star, params === null || params === void 0 ? void 0 : params.theme).star;
|
|
29605
|
+
this._draw(star, starAttribute, false, drawContext, params);
|
|
29743
29606
|
}
|
|
29744
29607
|
}
|
|
29745
29608
|
|
|
29746
|
-
const
|
|
29747
|
-
function
|
|
29748
|
-
if (isBindingContextLoaded(
|
|
29609
|
+
const loadedStarModuleContexts = new WeakSet();
|
|
29610
|
+
function bindStarRenderModule({ bind }) {
|
|
29611
|
+
if (isBindingContextLoaded(loadedStarModuleContexts, bind)) {
|
|
29749
29612
|
return;
|
|
29750
29613
|
}
|
|
29751
|
-
bind(
|
|
29752
|
-
.toDynamicValue(() => new
|
|
29614
|
+
bind(DefaultCanvasStarRender)
|
|
29615
|
+
.toDynamicValue(({ container }) => new DefaultCanvasStarRender(createContributionProvider(StarRenderContribution, container)))
|
|
29753
29616
|
.inSingletonScope();
|
|
29754
|
-
bind(
|
|
29755
|
-
bind(GraphicRender).toService(
|
|
29617
|
+
bind(StarRender).toService(DefaultCanvasStarRender);
|
|
29618
|
+
bind(GraphicRender).toService(StarRender);
|
|
29619
|
+
bindContributionProvider(bind, StarRenderContribution);
|
|
29756
29620
|
}
|
|
29757
|
-
const
|
|
29621
|
+
const starModule = bindStarRenderModule;
|
|
29758
29622
|
|
|
29759
|
-
class
|
|
29623
|
+
class DefaultCanvasGlyphRender {
|
|
29760
29624
|
constructor() {
|
|
29761
|
-
|
|
29762
|
-
this.type = 'pyramid3d';
|
|
29763
|
-
this.numberType = PYRAMID3D_NUMBER_TYPE;
|
|
29625
|
+
this.numberType = GLYPH_NUMBER_TYPE;
|
|
29764
29626
|
}
|
|
29765
|
-
|
|
29766
|
-
|
|
29767
|
-
|
|
29768
|
-
|
|
29769
|
-
|
|
29770
|
-
const data = this.valid(pyramid3d, pyramidAttribute, fillCb, strokeCb);
|
|
29771
|
-
if (!data) {
|
|
29627
|
+
reInit() {
|
|
29628
|
+
return;
|
|
29629
|
+
}
|
|
29630
|
+
drawShape(glyph, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
29631
|
+
if (!drawContext.drawContribution) {
|
|
29772
29632
|
return;
|
|
29773
29633
|
}
|
|
29774
|
-
|
|
29775
|
-
|
|
29776
|
-
|
|
29777
|
-
|
|
29778
|
-
let fc = fill;
|
|
29779
|
-
if (typeof fc !== 'string') {
|
|
29780
|
-
fc = 'black';
|
|
29634
|
+
glyph.getSubGraphic().forEach(item => {
|
|
29635
|
+
const renderer = drawContext.drawContribution.getRenderContribution(item);
|
|
29636
|
+
if (renderer && renderer.drawShape) {
|
|
29637
|
+
renderer.drawShape(item, context, x, y, drawContext, params, fillCb, strokeCb);
|
|
29781
29638
|
}
|
|
29782
|
-
|
|
29639
|
+
});
|
|
29640
|
+
}
|
|
29641
|
+
draw(glyph, renderService, drawContext, params) {
|
|
29642
|
+
const { context } = drawContext;
|
|
29643
|
+
if (!context) {
|
|
29644
|
+
return;
|
|
29783
29645
|
}
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
|
|
29646
|
+
context.highPerformanceSave();
|
|
29647
|
+
if (!drawContext.drawContribution) {
|
|
29648
|
+
return;
|
|
29787
29649
|
}
|
|
29650
|
+
const glyphTheme = getTheme(glyph);
|
|
29651
|
+
const subGraphic = glyph.getSubGraphic();
|
|
29652
|
+
subGraphic.length &&
|
|
29653
|
+
subGraphic.forEach(g => {
|
|
29654
|
+
drawContext.drawContribution.renderItem(g, drawContext, { theme: glyphTheme });
|
|
29655
|
+
});
|
|
29656
|
+
context.highPerformanceRestore();
|
|
29788
29657
|
}
|
|
29789
|
-
|
|
29790
|
-
|
|
29791
|
-
|
|
29658
|
+
}
|
|
29659
|
+
|
|
29660
|
+
const loadedGlyphModuleContexts = new WeakSet();
|
|
29661
|
+
function bindGlyphRenderModule({ bind }) {
|
|
29662
|
+
if (isBindingContextLoaded(loadedGlyphModuleContexts, bind)) {
|
|
29663
|
+
return;
|
|
29792
29664
|
}
|
|
29665
|
+
bind(DefaultCanvasGlyphRender)
|
|
29666
|
+
.toDynamicValue(() => new DefaultCanvasGlyphRender())
|
|
29667
|
+
.inSingletonScope();
|
|
29668
|
+
bind(GlyphRender).toService(DefaultCanvasGlyphRender);
|
|
29669
|
+
bind(GraphicRender).toService(GlyphRender);
|
|
29670
|
+
}
|
|
29671
|
+
const glyphModule = bindGlyphRenderModule;
|
|
29672
|
+
|
|
29673
|
+
class DefaultCanvasRichTextRender extends BaseRender {
|
|
29674
|
+
constructor() {
|
|
29675
|
+
super();
|
|
29676
|
+
this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
29677
|
+
this.builtinContributions = [defaultTextBackgroundRenderContribution];
|
|
29678
|
+
this.init();
|
|
29679
|
+
}
|
|
29680
|
+
drawShape(richtext, context, x, y, drawContext) {
|
|
29681
|
+
const richtextAttribute = getTheme(richtext).richtext;
|
|
29682
|
+
const { strokeOpacity = richtextAttribute.strokeOpacity, opacity = richtextAttribute.opacity, fillOpacity = richtextAttribute.fillOpacity, visible = richtextAttribute.visible } = richtext.attribute;
|
|
29683
|
+
if (!(richtext.valid && visible)) {
|
|
29684
|
+
return;
|
|
29685
|
+
}
|
|
29686
|
+
const fVisible = fillVisible(opacity, fillOpacity, true);
|
|
29687
|
+
const sVisible = fillVisible(opacity, strokeOpacity, true);
|
|
29688
|
+
if (!fVisible) {
|
|
29689
|
+
return;
|
|
29690
|
+
}
|
|
29691
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(richtext, richtext.attribute, richtextAttribute);
|
|
29692
|
+
context.translate(x, y);
|
|
29693
|
+
this.beforeRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
29694
|
+
const frame = richtext.getFrameCache();
|
|
29695
|
+
frame.draw(context, this.drawIcon);
|
|
29696
|
+
this.afterRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
29697
|
+
}
|
|
29698
|
+
drawIcon(icon, context, x, y, baseline) {
|
|
29699
|
+
var _a;
|
|
29700
|
+
const richtextIconAttribute = getTheme(icon).richtextIcon;
|
|
29701
|
+
const { width = richtextIconAttribute.width, height = richtextIconAttribute.height, opacity = richtextIconAttribute.opacity, image: url, backgroundFill = richtextIconAttribute.backgroundFill, backgroundFillOpacity = richtextIconAttribute.backgroundFillOpacity, backgroundStroke = richtextIconAttribute.backgroundStroke, backgroundStrokeOpacity = richtextIconAttribute.backgroundStrokeOpacity, backgroundRadius = richtextIconAttribute.backgroundRadius, margin } = icon.attribute;
|
|
29702
|
+
const { backgroundWidth = width, backgroundHeight = height } = icon.attribute;
|
|
29703
|
+
if (margin) {
|
|
29704
|
+
x += icon._marginArray[3];
|
|
29705
|
+
y += icon._marginArray[0];
|
|
29706
|
+
}
|
|
29707
|
+
if (icon._hovered) {
|
|
29708
|
+
const expandX = (backgroundWidth - width) / 2;
|
|
29709
|
+
const expandY = (backgroundHeight - height) / 2;
|
|
29710
|
+
if (backgroundRadius === 0) {
|
|
29711
|
+
context.beginPath();
|
|
29712
|
+
context.rect(x - expandX, y - expandY, backgroundWidth, backgroundHeight);
|
|
29713
|
+
}
|
|
29714
|
+
else {
|
|
29715
|
+
context.beginPath();
|
|
29716
|
+
createRectPath(context, x - expandX, y - expandY, backgroundWidth, backgroundHeight, backgroundRadius, true);
|
|
29717
|
+
}
|
|
29718
|
+
if (backgroundFill) {
|
|
29719
|
+
context.globalAlpha = backgroundFillOpacity;
|
|
29720
|
+
context.fillStyle = backgroundFill;
|
|
29721
|
+
context.fill();
|
|
29722
|
+
}
|
|
29723
|
+
if (backgroundStroke) {
|
|
29724
|
+
context.globalAlpha = backgroundStrokeOpacity;
|
|
29725
|
+
context.strokeStyle = backgroundStroke;
|
|
29726
|
+
context.stroke();
|
|
29727
|
+
}
|
|
29728
|
+
}
|
|
29729
|
+
const res = url && ((_a = icon === null || icon === void 0 ? void 0 : icon.resources) === null || _a === void 0 ? void 0 : _a.get(url));
|
|
29730
|
+
if (!res || res.state !== 'success') {
|
|
29731
|
+
return;
|
|
29732
|
+
}
|
|
29733
|
+
context.globalAlpha = opacity;
|
|
29734
|
+
context.drawImage(res.data, x, y, width, height);
|
|
29735
|
+
}
|
|
29736
|
+
draw(richtext, renderService, drawContext) {
|
|
29737
|
+
const richtextAttribute = getTheme(richtext).richtext;
|
|
29738
|
+
this._draw(richtext, richtextAttribute, false, drawContext);
|
|
29739
|
+
}
|
|
29740
|
+
}
|
|
29741
|
+
|
|
29742
|
+
const loadedRichtextModuleContexts = new WeakSet();
|
|
29743
|
+
function bindRichtextRenderModule({ bind }) {
|
|
29744
|
+
if (isBindingContextLoaded(loadedRichtextModuleContexts, bind)) {
|
|
29745
|
+
return;
|
|
29746
|
+
}
|
|
29747
|
+
bind(DefaultCanvasRichTextRender)
|
|
29748
|
+
.toDynamicValue(() => new DefaultCanvasRichTextRender())
|
|
29749
|
+
.inSingletonScope();
|
|
29750
|
+
bind(RichTextRender).toService(DefaultCanvasRichTextRender);
|
|
29751
|
+
bind(GraphicRender).toService(RichTextRender);
|
|
29752
|
+
}
|
|
29753
|
+
const richtextModule = bindRichtextRenderModule;
|
|
29754
|
+
|
|
29755
|
+
const loadedImageModuleContexts = new WeakSet();
|
|
29756
|
+
function bindImageRenderModule({ bind }) {
|
|
29757
|
+
if (isBindingContextLoaded(loadedImageModuleContexts, bind)) {
|
|
29758
|
+
return;
|
|
29759
|
+
}
|
|
29760
|
+
bind(ImageRender)
|
|
29761
|
+
.toDynamicValue(({ container }) => new DefaultCanvasImageRender(createContributionProvider(ImageRenderContribution, container)))
|
|
29762
|
+
.inSingletonScope();
|
|
29763
|
+
bind(GraphicRender).toService(ImageRender);
|
|
29764
|
+
bind(ImageRenderContribution).toService(DefaultBaseInteractiveRenderContribution);
|
|
29765
|
+
bindContributionProvider(bind, ImageRenderContribution);
|
|
29766
|
+
}
|
|
29767
|
+
const imageModule = bindImageRenderModule;
|
|
29768
|
+
|
|
29769
|
+
const loadedRect3dModuleContexts = new WeakSet();
|
|
29770
|
+
function bindRect3dRenderModule({ bind }) {
|
|
29771
|
+
if (isBindingContextLoaded(loadedRect3dModuleContexts, bind)) {
|
|
29772
|
+
return;
|
|
29773
|
+
}
|
|
29774
|
+
bind(DefaultCanvasRect3dRender)
|
|
29775
|
+
.toDynamicValue(() => new DefaultCanvasRect3dRender())
|
|
29776
|
+
.inSingletonScope();
|
|
29777
|
+
bind(Rect3DRender).toService(DefaultCanvasRect3dRender);
|
|
29778
|
+
bind(GraphicRender).toService(Rect3DRender);
|
|
29779
|
+
}
|
|
29780
|
+
const rect3dModule = bindRect3dRenderModule;
|
|
29781
|
+
|
|
29782
|
+
const loadedArc3dModuleContexts = new WeakSet();
|
|
29783
|
+
function bindArc3dRenderModule({ bind }) {
|
|
29784
|
+
if (isBindingContextLoaded(loadedArc3dModuleContexts, bind)) {
|
|
29785
|
+
return;
|
|
29786
|
+
}
|
|
29787
|
+
bind(DefaultCanvasArc3DRender)
|
|
29788
|
+
.toDynamicValue(() => new DefaultCanvasArc3DRender())
|
|
29789
|
+
.inSingletonScope();
|
|
29790
|
+
bind(Arc3dRender).toService(DefaultCanvasArc3DRender);
|
|
29791
|
+
bind(GraphicRender).toService(Arc3dRender);
|
|
29793
29792
|
}
|
|
29793
|
+
const arc3dModule = bindArc3dRenderModule;
|
|
29794
29794
|
|
|
29795
29795
|
const loadedPyramid3dModuleContexts = new WeakSet();
|
|
29796
29796
|
function bindPyramid3dRenderModule({ bind }) {
|
|
@@ -30730,4 +30730,4 @@ const registerFlexLayoutPlugin = () => {
|
|
|
30730
30730
|
Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
|
|
30731
30731
|
};
|
|
30732
30732
|
|
|
30733
|
-
export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Context2dFactory, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerFactory, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, PluginRegistry, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step, StepClosed, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dRenderModule, bindArcRenderModule, bindAreaRenderModule, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindGlyphRenderModule, bindImageRenderModule, bindLineRenderModule, bindPathRenderModule, bindPolygonRenderModule, bindPyramid3dRenderModule, bindRect3dRenderModule, bindRectRenderModule, bindRichtextRenderModule, bindStarRenderModule, bindSymbolRenderModule, bindTextRenderModule, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, configureRuntimeApplicationForApp, container, cornerTangents, createBrowserApp as createApp, createArc, createArc3d, createArea, createBrowserApp, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createContributionProvider, createEventTransformer, createGlyph, createGraphic, createGroup, createImage, createLine, createMat4, createMiniappApp, createNodeApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getBackgroundImage, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getLegacyBindingContext, getModelMatrix, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, installRuntimeContributionModule, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNoRepeatSizingMode, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldClipImageByLayout, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformMat4, transformPointForCanvas, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|
|
30733
|
+
export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, Base3dRender, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Context2dFactory, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArc3DRender, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasPyramid3dRender, DefaultCanvasRect3dRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerFactory, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, PluginRegistry, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step, StepClosed, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dRenderModule, bindArcRenderModule, bindAreaRenderModule, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindGlyphRenderModule, bindImageRenderModule, bindLineRenderModule, bindPathRenderModule, bindPolygonRenderModule, bindPyramid3dRenderModule, bindRect3dRenderModule, bindRectRenderModule, bindRichtextRenderModule, bindStarRenderModule, bindSymbolRenderModule, bindTextRenderModule, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, configureRuntimeApplicationForApp, container, cornerTangents, createBrowserApp as createApp, createArc, createArc3d, createArea, createBrowserApp, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createContributionProvider, createEventTransformer, createGlyph, createGraphic, createGroup, createImage, createLine, createMat4, createMiniappApp, createNodeApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getBackgroundImage, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getLegacyBindingContext, getModelMatrix, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, installRuntimeContributionModule, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNoRepeatSizingMode, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldClipImageByLayout, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformMat4, transformPointForCanvas, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|