@visactor/vrender-core 1.0.44 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/canvas/constants.js +2 -1
- package/cjs/color-string/index.js +1 -2
- package/cjs/common/diff.js +2 -1
- package/cjs/common/event-transformer.js +1 -2
- package/cjs/common/render-area.js +1 -1
- package/cjs/common/render-command-list.js +1 -1
- package/cjs/common/render-curve.js +1 -1
- package/cjs/common/render-utils.js +1 -1
- package/cjs/common/seg-context.js +1 -1
- package/cjs/common/simplify.js +2 -1
- package/cjs/common/sort.js +1 -1
- package/cjs/common/split-path.js +1 -1
- package/cjs/common/store.js +1 -1
- package/cjs/common/text.js +1 -1
- package/cjs/common/utils.js +1 -1
- package/cjs/core/constants.js +1 -1
- package/cjs/core/core-modules.js +1 -1
- package/cjs/core/global-module.js +0 -2
- package/cjs/core/global.js +1 -1
- package/cjs/core/graphic-utils.js +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/layer-service.js +1 -2
- package/cjs/core/layer.d.ts +1 -1
- package/cjs/core/layer.js +1 -1
- package/cjs/core/layer.js.map +1 -1
- package/cjs/core/light.js +1 -1
- package/cjs/core/stage.d.ts +5 -3
- package/cjs/core/stage.js +17 -5
- package/cjs/core/stage.js.map +1 -1
- package/cjs/core/window.js +1 -1
- package/cjs/graphic/config.js +7 -1
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/graphic.js +5 -2
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/image.d.ts +1 -0
- package/cjs/graphic/image.js +2 -1
- package/cjs/graphic/image.js.map +1 -1
- package/cjs/interface/graphic/image.d.ts +7 -1
- package/cjs/interface/graphic/image.js.map +1 -1
- package/cjs/interface/graphic.d.ts +14 -2
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/layer.d.ts +3 -2
- package/cjs/interface/layer.js.map +1 -1
- package/cjs/interface/render.d.ts +1 -1
- package/cjs/interface/render.js.map +1 -1
- package/cjs/interface/stage.d.ts +3 -2
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/render/contributions/render/contributions/base-contribution-render.d.ts +27 -9
- package/cjs/render/contributions/render/contributions/base-contribution-render.js +147 -34
- package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/group-contribution-render.js +8 -6
- package/cjs/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/text-contribution-render.js +20 -17
- package/cjs/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-contribution.js +16 -5
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/image-render.d.ts +14 -1
- package/cjs/render/contributions/render/image-render.js +99 -20
- package/cjs/render/contributions/render/image-render.js.map +1 -1
- package/dist/index.es.js +414 -114
- package/es/canvas/constants.js +2 -1
- package/es/color-string/index.js +1 -2
- package/es/common/diff.js +2 -1
- package/es/common/event-transformer.js +1 -2
- package/es/common/render-area.js +1 -1
- package/es/common/render-command-list.js +1 -1
- package/es/common/render-curve.js +1 -1
- package/es/common/render-utils.js +1 -1
- package/es/common/seg-context.js +1 -1
- package/es/common/simplify.js +2 -1
- package/es/common/sort.js +1 -1
- package/es/common/split-path.js +1 -1
- package/es/common/store.js +1 -1
- package/es/common/text.js +1 -1
- package/es/common/utils.js +1 -1
- package/es/core/constants.js +1 -1
- package/es/core/core-modules.js +1 -1
- package/es/core/global-module.js +0 -2
- package/es/core/global.js +1 -1
- package/es/core/graphic-utils.js +1 -1
- package/es/core/index.js +1 -1
- package/es/core/layer-service.js +1 -2
- package/es/core/layer.d.ts +1 -1
- package/es/core/layer.js +1 -1
- package/es/core/layer.js.map +1 -1
- package/es/core/light.js +1 -1
- package/es/core/stage.d.ts +5 -3
- package/es/core/stage.js +17 -6
- package/es/core/stage.js.map +1 -1
- package/es/core/window.js +1 -1
- package/es/graphic/config.js +7 -1
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/graphic.js +4 -2
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/image.d.ts +1 -0
- package/es/graphic/image.js +2 -1
- package/es/graphic/image.js.map +1 -1
- package/es/interface/graphic/image.d.ts +7 -1
- package/es/interface/graphic/image.js.map +1 -1
- package/es/interface/graphic.d.ts +14 -2
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/layer.d.ts +3 -2
- package/es/interface/layer.js.map +1 -1
- package/es/interface/render.d.ts +1 -1
- package/es/interface/render.js.map +1 -1
- package/es/interface/stage.d.ts +3 -2
- package/es/interface/stage.js.map +1 -1
- package/es/render/contributions/render/contributions/base-contribution-render.d.ts +27 -9
- package/es/render/contributions/render/contributions/base-contribution-render.js +140 -33
- package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/group-contribution-render.js +9 -7
- package/es/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/text-contribution-render.js +20 -16
- package/es/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
- package/es/render/contributions/render/draw-contribution.js +17 -4
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/image-render.d.ts +14 -1
- package/es/render/contributions/render/image-render.js +93 -18
- package/es/render/contributions/render/image-render.js.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -3563,7 +3563,7 @@ const DefaultTextStyle = {
|
|
|
3563
3563
|
const DefaultPickStyle = {
|
|
3564
3564
|
pickStrokeBuffer: 0
|
|
3565
3565
|
};
|
|
3566
|
-
const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({ forceBoundsWidth: undefined, forceBoundsHeight: undefined, opacity: 1, background: null, autoAnimateTexture: false, textureRatio: 1, textureOptions: null, backgroundOpacity: 1, backgroundCornerRadius: 0, texture: null, textureColor: 'black', textureSize: 10, texturePadding: 2, backgroundMode: 'no-repeat', backgroundFit: true, backgroundKeepAspectRatio: false, backgroundClip: true, backgroundScale: 1, backgroundOffsetX: 0, backgroundOffsetY: 0, blur: 0, filter: '', cursor: null, html: null, react: null, vue: null }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout), DefaultPickStyle);
|
|
3566
|
+
const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({ forceBoundsWidth: undefined, forceBoundsHeight: undefined, opacity: 1, background: null, autoAnimateTexture: false, textureRatio: 1, textureOptions: null, backgroundOpacity: 1, backgroundCornerRadius: 0, texture: null, textureColor: 'black', textureSize: 10, texturePadding: 2, backgroundMode: 'no-repeat', backgroundFit: true, backgroundKeepAspectRatio: false, backgroundClip: true, backgroundScale: 1, backgroundOffsetX: 0, backgroundOffsetY: 0, backgroundPosition: 'top-left', blur: 0, filter: '', cursor: null, html: null, react: null, vue: null }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout), DefaultPickStyle);
|
|
3567
3567
|
const DefaultConnectAttribute = {
|
|
3568
3568
|
connectedType: 'none',
|
|
3569
3569
|
connectedStyle: {},
|
|
@@ -3598,7 +3598,7 @@ const DefaultRect3dAttribute = Object.assign(Object.assign({}, DefaultAttribute)
|
|
|
3598
3598
|
const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), { symbolType: 'circle', size: 10, keepDirIn3d: true, clipRange: 1 });
|
|
3599
3599
|
const DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { strokeBoundsBuffer: 0, keepDirIn3d: true });
|
|
3600
3600
|
const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { upgradeAttrs: null, editable: false, editOptions: null, ascentDescentMode: 'actual', width: 300, height: 300, ellipsis: true, wordBreak: 'break-word', verticalDirection: 'top', textAlign: 'left', textBaseline: 'top', layoutDirection: 'horizontal', textConfig: [], disableAutoWrapLine: false, maxHeight: undefined, maxWidth: undefined, singleLine: false });
|
|
3601
|
-
const DefaultImageAttribute = Object.assign(Object.assign({ repeatX: 'no-repeat', repeatY: 'no-repeat', image: '', width: 0, height: 0, maxWidth: 500, maxHeight: 500 }, DefaultAttribute), { fill: true, cornerRadius: 0, cornerType: 'round' });
|
|
3601
|
+
const DefaultImageAttribute = Object.assign(Object.assign({ repeatX: 'no-repeat', repeatY: 'no-repeat', imageMode: undefined, image: '', width: 0, height: 0, maxWidth: 500, maxHeight: 500, imagePosition: 'top-left', imageScale: 1, imageOffsetX: 0, imageOffsetY: 0 }, DefaultAttribute), { fill: true, cornerRadius: 0, cornerType: 'round' });
|
|
3602
3602
|
const DefaultRichTextIconAttribute = Object.assign(Object.assign({}, DefaultImageAttribute), { backgroundShowMode: 'never', backgroundWidth: 0, backgroundHeight: 0, textAlign: 'left', textBaseline: 'middle', direction: 'horizontal', margin: 0, id: '', width: 20, height: 20, backgroundFill: 'rgba(101, 117, 168, 0.1)', backgroundFillOpacity: 1, backgroundStroke: false, backgroundStrokeOpacity: 1, backgroundRadius: 4, opacity: 1 });
|
|
3603
3603
|
|
|
3604
3604
|
const parse = (function () {
|
|
@@ -12056,7 +12056,14 @@ class Graphic extends Node {
|
|
|
12056
12056
|
return this.pathProxy;
|
|
12057
12057
|
}
|
|
12058
12058
|
loadImage(image, background = false) {
|
|
12059
|
-
if (
|
|
12059
|
+
if (background && (image === null || image === void 0 ? void 0 : image.background)) {
|
|
12060
|
+
image = image.background;
|
|
12061
|
+
}
|
|
12062
|
+
if (background && (!image || backgroundNotImage(image))) {
|
|
12063
|
+
this.backgroundImg = false;
|
|
12064
|
+
return;
|
|
12065
|
+
}
|
|
12066
|
+
if (!image) {
|
|
12060
12067
|
return;
|
|
12061
12068
|
}
|
|
12062
12069
|
const url = image;
|
|
@@ -12168,9 +12175,15 @@ class Graphic extends Node {
|
|
|
12168
12175
|
Graphic.userSymbolMap = {};
|
|
12169
12176
|
Graphic.mixin(EventTarget);
|
|
12170
12177
|
function backgroundNotImage(image) {
|
|
12178
|
+
if (typeof image === 'string') {
|
|
12179
|
+
return !(image.startsWith('<svg') || isValidUrl(image) || image.includes('/') || isBase64(image));
|
|
12180
|
+
}
|
|
12171
12181
|
if (image.fill || image.stroke) {
|
|
12172
12182
|
return true;
|
|
12173
12183
|
}
|
|
12184
|
+
if (typeof image.gradient === 'string' && Array.isArray(image.stops)) {
|
|
12185
|
+
return true;
|
|
12186
|
+
}
|
|
12174
12187
|
return false;
|
|
12175
12188
|
}
|
|
12176
12189
|
|
|
@@ -15296,7 +15309,17 @@ function seperateParagraph(paragraph, index) {
|
|
|
15296
15309
|
return [p1, p2];
|
|
15297
15310
|
}
|
|
15298
15311
|
|
|
15299
|
-
const IMAGE_UPDATE_TAG_KEY = [
|
|
15312
|
+
const IMAGE_UPDATE_TAG_KEY = [
|
|
15313
|
+
'width',
|
|
15314
|
+
'height',
|
|
15315
|
+
'image',
|
|
15316
|
+
'imageMode',
|
|
15317
|
+
'imagePosition',
|
|
15318
|
+
'imageScale',
|
|
15319
|
+
'imageOffsetX',
|
|
15320
|
+
'imageOffsetY',
|
|
15321
|
+
...GRAPHIC_UPDATE_TAG_KEY
|
|
15322
|
+
];
|
|
15300
15323
|
class Image extends Graphic {
|
|
15301
15324
|
constructor(params) {
|
|
15302
15325
|
super(params);
|
|
@@ -15442,7 +15465,7 @@ class Image extends Graphic {
|
|
|
15442
15465
|
return Image.NOWORK_ANIMATE_ATTR;
|
|
15443
15466
|
}
|
|
15444
15467
|
}
|
|
15445
|
-
Image.NOWORK_ANIMATE_ATTR = Object.assign({ image: 1, repeatX: 1, repeatY: 1 }, NOWORK_ANIMATE_ATTR);
|
|
15468
|
+
Image.NOWORK_ANIMATE_ATTR = Object.assign({ image: 1, imageMode: 1, repeatX: 1, repeatY: 1 }, NOWORK_ANIMATE_ATTR);
|
|
15446
15469
|
function createImage(attributes) {
|
|
15447
15470
|
return new Image(attributes);
|
|
15448
15471
|
}
|
|
@@ -17263,13 +17286,13 @@ class DefaultBaseBackgroundRenderContribution {
|
|
|
17263
17286
|
}
|
|
17264
17287
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
|
|
17265
17288
|
var _a;
|
|
17266
|
-
const { background, backgroundOpacity = (_a = graphic.attribute.fillOpacity) !== null && _a !== void 0 ? _a : graphicAttribute.backgroundOpacity, opacity = graphicAttribute.opacity, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY, backgroundClip = graphicAttribute.backgroundClip } = graphic.attribute;
|
|
17289
|
+
const { background, backgroundOpacity = (_a = graphic.attribute.fillOpacity) !== null && _a !== void 0 ? _a : graphicAttribute.backgroundOpacity, opacity = graphicAttribute.opacity, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY, backgroundClip = graphicAttribute.backgroundClip, backgroundPosition = graphicAttribute.backgroundPosition } = graphic.attribute;
|
|
17267
17290
|
if (!background) {
|
|
17268
17291
|
return;
|
|
17269
17292
|
}
|
|
17270
17293
|
if (graphic.backgroundImg && graphic.resources) {
|
|
17271
|
-
const res = graphic.resources.get(background);
|
|
17272
|
-
if (res.state !== 'success' || !res.data) {
|
|
17294
|
+
const res = graphic.resources.get(getBackgroundImage(background));
|
|
17295
|
+
if (!res || res.state !== 'success' || !res.data) {
|
|
17273
17296
|
return;
|
|
17274
17297
|
}
|
|
17275
17298
|
context.save();
|
|
@@ -17289,7 +17312,8 @@ class DefaultBaseBackgroundRenderContribution {
|
|
|
17289
17312
|
backgroundKeepAspectRatio,
|
|
17290
17313
|
backgroundScale,
|
|
17291
17314
|
backgroundOffsetX,
|
|
17292
|
-
backgroundOffsetY
|
|
17315
|
+
backgroundOffsetY,
|
|
17316
|
+
backgroundPosition
|
|
17293
17317
|
});
|
|
17294
17318
|
context.restore();
|
|
17295
17319
|
if (!graphic.transMatrix.onlyTranslate()) {
|
|
@@ -17306,65 +17330,211 @@ class DefaultBaseBackgroundRenderContribution {
|
|
|
17306
17330
|
}
|
|
17307
17331
|
}
|
|
17308
17332
|
doDrawImage(context, data, b, params) {
|
|
17309
|
-
|
|
17310
|
-
|
|
17311
|
-
|
|
17312
|
-
|
|
17313
|
-
|
|
17314
|
-
|
|
17315
|
-
|
|
17316
|
-
|
|
17317
|
-
|
|
17318
|
-
|
|
17319
|
-
|
|
17320
|
-
|
|
17321
|
-
|
|
17322
|
-
|
|
17323
|
-
|
|
17324
|
-
|
|
17325
|
-
|
|
17326
|
-
|
|
17327
|
-
|
|
17328
|
-
|
|
17333
|
+
drawBackgroundImage(context, data, b, params);
|
|
17334
|
+
}
|
|
17335
|
+
}
|
|
17336
|
+
const defaultBaseBackgroundRenderContribution = new DefaultBaseBackgroundRenderContribution();
|
|
17337
|
+
const verticalPositionKeywords = new Set(['top', 'center', 'bottom']);
|
|
17338
|
+
function getBackgroundImage(background) {
|
|
17339
|
+
var _a;
|
|
17340
|
+
return (_a = background === null || background === void 0 ? void 0 : background.background) !== null && _a !== void 0 ? _a : background;
|
|
17341
|
+
}
|
|
17342
|
+
function resolveBackgroundSizing({ backgroundFit, backgroundKeepAspectRatio }) {
|
|
17343
|
+
if (backgroundFit) {
|
|
17344
|
+
return backgroundKeepAspectRatio ? 'cover' : 'fill';
|
|
17345
|
+
}
|
|
17346
|
+
return 'auto';
|
|
17347
|
+
}
|
|
17348
|
+
function isNoRepeatSizingMode(mode) {
|
|
17349
|
+
return typeof mode === 'string' && mode.startsWith('no-repeat-');
|
|
17350
|
+
}
|
|
17351
|
+
const NO_REPEAT_SIZING_MAP = {
|
|
17352
|
+
'no-repeat-cover': 'cover',
|
|
17353
|
+
'no-repeat-contain': 'contain',
|
|
17354
|
+
'no-repeat-fill': 'fill',
|
|
17355
|
+
'no-repeat-auto': 'auto'
|
|
17356
|
+
};
|
|
17357
|
+
function resolveBackgroundDrawMode({ backgroundMode, backgroundFit, backgroundKeepAspectRatio }) {
|
|
17358
|
+
const sizing = NO_REPEAT_SIZING_MAP[backgroundMode];
|
|
17359
|
+
if (sizing) {
|
|
17360
|
+
return {
|
|
17361
|
+
backgroundRepeatMode: 'no-repeat',
|
|
17362
|
+
backgroundSizing: sizing
|
|
17363
|
+
};
|
|
17364
|
+
}
|
|
17365
|
+
return {
|
|
17366
|
+
backgroundRepeatMode: backgroundMode,
|
|
17367
|
+
backgroundSizing: resolveBackgroundSizing({
|
|
17368
|
+
backgroundFit,
|
|
17369
|
+
backgroundKeepAspectRatio
|
|
17370
|
+
})
|
|
17371
|
+
};
|
|
17372
|
+
}
|
|
17373
|
+
function isPercentageValue(value) {
|
|
17374
|
+
return /^-?\d+(\.\d+)?%$/.test(value);
|
|
17375
|
+
}
|
|
17376
|
+
function parsePositionToken(value, remainSpace, startKeyword, centerKeyword, endKeyword) {
|
|
17377
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
17378
|
+
return value;
|
|
17379
|
+
}
|
|
17380
|
+
const normalizedValue = `${value !== null && value !== void 0 ? value : ''}`.trim().toLowerCase();
|
|
17381
|
+
if (!normalizedValue || normalizedValue === startKeyword) {
|
|
17382
|
+
return 0;
|
|
17383
|
+
}
|
|
17384
|
+
if (normalizedValue === centerKeyword) {
|
|
17385
|
+
return remainSpace / 2;
|
|
17386
|
+
}
|
|
17387
|
+
if (normalizedValue === endKeyword) {
|
|
17388
|
+
return remainSpace;
|
|
17389
|
+
}
|
|
17390
|
+
if (isPercentageValue(normalizedValue)) {
|
|
17391
|
+
return (remainSpace * parseFloat(normalizedValue)) / 100;
|
|
17392
|
+
}
|
|
17393
|
+
const parsedValue = Number(normalizedValue);
|
|
17394
|
+
if (Number.isFinite(parsedValue)) {
|
|
17395
|
+
return parsedValue;
|
|
17396
|
+
}
|
|
17397
|
+
return 0;
|
|
17398
|
+
}
|
|
17399
|
+
function normalizeBackgroundPosition(position) {
|
|
17400
|
+
var _a, _b;
|
|
17401
|
+
if (Array.isArray(position)) {
|
|
17402
|
+
return [(_a = position[0]) !== null && _a !== void 0 ? _a : 'left', (_b = position[1]) !== null && _b !== void 0 ? _b : 'top'];
|
|
17403
|
+
}
|
|
17404
|
+
const normalizedPosition = `${position !== null && position !== void 0 ? position : 'top-left'}`.trim().toLowerCase().replace(/-/g, ' ');
|
|
17405
|
+
const tokens = normalizedPosition.split(/\s+/).filter(Boolean);
|
|
17406
|
+
if (tokens.length === 0) {
|
|
17407
|
+
return ['left', 'top'];
|
|
17408
|
+
}
|
|
17409
|
+
if (tokens.length === 1) {
|
|
17410
|
+
const token = tokens[0];
|
|
17411
|
+
if (token === 'center') {
|
|
17412
|
+
return ['center', 'center'];
|
|
17329
17413
|
}
|
|
17330
|
-
|
|
17331
|
-
|
|
17332
|
-
|
|
17333
|
-
|
|
17334
|
-
|
|
17335
|
-
|
|
17336
|
-
|
|
17337
|
-
|
|
17338
|
-
|
|
17339
|
-
|
|
17340
|
-
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
17344
|
-
|
|
17345
|
-
|
|
17346
|
-
|
|
17347
|
-
if (ctx) {
|
|
17348
|
-
ctx.inuse = true;
|
|
17349
|
-
ctx.clearMatrix();
|
|
17350
|
-
ctx.setTransformForCurrent(true);
|
|
17351
|
-
ctx.clearRect(0, 0, w, h);
|
|
17352
|
-
ctx.drawImage(data, 0, 0, w, h);
|
|
17353
|
-
data = canvas.nativeCanvas;
|
|
17354
|
-
}
|
|
17355
|
-
canvasAllocate.free(canvas);
|
|
17356
|
-
}
|
|
17357
|
-
const dpr = context.dpr;
|
|
17358
|
-
const pattern = context.createPattern(data, backgroundMode);
|
|
17359
|
-
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0]));
|
|
17360
|
-
context.fillStyle = pattern;
|
|
17361
|
-
context.translate(b.x1, b.y1);
|
|
17362
|
-
context.fillRect(0, 0, targetW, targetH);
|
|
17363
|
-
context.translate(-b.x1, -b.y1);
|
|
17414
|
+
if (verticalPositionKeywords.has(token)) {
|
|
17415
|
+
return ['center', token];
|
|
17416
|
+
}
|
|
17417
|
+
return [token, 'center'];
|
|
17418
|
+
}
|
|
17419
|
+
let horizontal;
|
|
17420
|
+
let vertical;
|
|
17421
|
+
const genericTokens = [];
|
|
17422
|
+
for (let i = 0; i < 2; i++) {
|
|
17423
|
+
const token = tokens[i];
|
|
17424
|
+
if (token === 'left' || token === 'right') {
|
|
17425
|
+
horizontal = token;
|
|
17426
|
+
continue;
|
|
17427
|
+
}
|
|
17428
|
+
if (token === 'top' || token === 'bottom') {
|
|
17429
|
+
vertical = token;
|
|
17430
|
+
continue;
|
|
17364
17431
|
}
|
|
17432
|
+
genericTokens.push(token);
|
|
17365
17433
|
}
|
|
17434
|
+
if (horizontal == null && genericTokens.length) {
|
|
17435
|
+
horizontal = genericTokens.shift();
|
|
17436
|
+
}
|
|
17437
|
+
if (vertical == null && genericTokens.length) {
|
|
17438
|
+
vertical = genericTokens.shift();
|
|
17439
|
+
}
|
|
17440
|
+
return [horizontal !== null && horizontal !== void 0 ? horizontal : 'left', vertical !== null && vertical !== void 0 ? vertical : 'top'];
|
|
17441
|
+
}
|
|
17442
|
+
function resolveBackgroundPosition(position, remainWidth, remainHeight) {
|
|
17443
|
+
const [horizontalPosition, verticalPosition] = normalizeBackgroundPosition(position);
|
|
17444
|
+
return {
|
|
17445
|
+
x: parsePositionToken(horizontalPosition, remainWidth, 'left', 'center', 'right'),
|
|
17446
|
+
y: parsePositionToken(verticalPosition, remainHeight, 'top', 'center', 'bottom')
|
|
17447
|
+
};
|
|
17448
|
+
}
|
|
17449
|
+
function pickRenderableDimension(...values) {
|
|
17450
|
+
for (const value of values) {
|
|
17451
|
+
if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
|
|
17452
|
+
return value;
|
|
17453
|
+
}
|
|
17454
|
+
}
|
|
17455
|
+
return null;
|
|
17456
|
+
}
|
|
17457
|
+
function resolveRenderableImageSize(data) {
|
|
17458
|
+
if (!data) {
|
|
17459
|
+
return null;
|
|
17460
|
+
}
|
|
17461
|
+
const width = pickRenderableDimension(data.naturalWidth, data.videoWidth, data.width);
|
|
17462
|
+
const height = pickRenderableDimension(data.naturalHeight, data.videoHeight, data.height);
|
|
17463
|
+
if (width == null || height == null) {
|
|
17464
|
+
return null;
|
|
17465
|
+
}
|
|
17466
|
+
return { width, height };
|
|
17467
|
+
}
|
|
17468
|
+
function drawBackgroundImage(context, data, b, params) {
|
|
17469
|
+
var _a, _b;
|
|
17470
|
+
const { backgroundMode, backgroundFit, backgroundKeepAspectRatio, backgroundScale = 1, backgroundOffsetX = 0, backgroundOffsetY = 0, backgroundPosition = 'top-left' } = params;
|
|
17471
|
+
const targetW = b.width();
|
|
17472
|
+
const targetH = b.height();
|
|
17473
|
+
const sourceSize = resolveRenderableImageSize(data);
|
|
17474
|
+
const { backgroundRepeatMode, backgroundSizing: resolvedBackgroundSizing } = resolveBackgroundDrawMode({
|
|
17475
|
+
backgroundMode,
|
|
17476
|
+
backgroundFit,
|
|
17477
|
+
backgroundKeepAspectRatio
|
|
17478
|
+
});
|
|
17479
|
+
let w = targetW;
|
|
17480
|
+
let h = targetH;
|
|
17481
|
+
if (targetW <= 0 || targetH <= 0) {
|
|
17482
|
+
return;
|
|
17483
|
+
}
|
|
17484
|
+
if (backgroundRepeatMode === 'no-repeat') {
|
|
17485
|
+
let drawWidth = (_a = sourceSize === null || sourceSize === void 0 ? void 0 : sourceSize.width) !== null && _a !== void 0 ? _a : targetW;
|
|
17486
|
+
let drawHeight = (_b = sourceSize === null || sourceSize === void 0 ? void 0 : sourceSize.height) !== null && _b !== void 0 ? _b : targetH;
|
|
17487
|
+
if ((resolvedBackgroundSizing === 'cover' || resolvedBackgroundSizing === 'contain') && sourceSize) {
|
|
17488
|
+
const scale = resolvedBackgroundSizing === 'cover'
|
|
17489
|
+
? Math.max(targetW / sourceSize.width, targetH / sourceSize.height)
|
|
17490
|
+
: Math.min(targetW / sourceSize.width, targetH / sourceSize.height);
|
|
17491
|
+
drawWidth = sourceSize.width * scale;
|
|
17492
|
+
drawHeight = sourceSize.height * scale;
|
|
17493
|
+
}
|
|
17494
|
+
else if (resolvedBackgroundSizing === 'fill') {
|
|
17495
|
+
drawWidth = targetW;
|
|
17496
|
+
drawHeight = targetH;
|
|
17497
|
+
}
|
|
17498
|
+
drawWidth *= backgroundScale;
|
|
17499
|
+
drawHeight *= backgroundScale;
|
|
17500
|
+
const { x, y } = resolveBackgroundPosition(backgroundPosition, targetW - drawWidth, targetH - drawHeight);
|
|
17501
|
+
context.drawImage(data, b.x1 + x + backgroundOffsetX, b.y1 + y + backgroundOffsetY, drawWidth, drawHeight);
|
|
17502
|
+
return;
|
|
17503
|
+
}
|
|
17504
|
+
if (backgroundFit && backgroundRepeatMode !== 'repeat' && sourceSize) {
|
|
17505
|
+
const resW = sourceSize.width;
|
|
17506
|
+
const resH = sourceSize.height;
|
|
17507
|
+
if (backgroundRepeatMode === 'repeat-x') {
|
|
17508
|
+
const ratio = targetH / resH;
|
|
17509
|
+
w = resW * ratio;
|
|
17510
|
+
h = targetH;
|
|
17511
|
+
}
|
|
17512
|
+
else if (backgroundRepeatMode === 'repeat-y') {
|
|
17513
|
+
const ratio = targetW / resW;
|
|
17514
|
+
h = resH * ratio;
|
|
17515
|
+
w = targetW;
|
|
17516
|
+
}
|
|
17517
|
+
const dpr = context.dpr;
|
|
17518
|
+
const canvas = canvasAllocate.allocate({ width: w, height: h, dpr });
|
|
17519
|
+
const ctx = canvas.getContext('2d');
|
|
17520
|
+
if (ctx) {
|
|
17521
|
+
ctx.inuse = true;
|
|
17522
|
+
ctx.clearMatrix();
|
|
17523
|
+
ctx.setTransformForCurrent(true);
|
|
17524
|
+
ctx.clearRect(0, 0, w, h);
|
|
17525
|
+
ctx.drawImage(data, 0, 0, w, h);
|
|
17526
|
+
data = canvas.nativeCanvas;
|
|
17527
|
+
}
|
|
17528
|
+
canvasAllocate.free(canvas);
|
|
17529
|
+
}
|
|
17530
|
+
const dpr = context.dpr;
|
|
17531
|
+
const pattern = context.createPattern(data, backgroundRepeatMode);
|
|
17532
|
+
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0]));
|
|
17533
|
+
context.fillStyle = pattern;
|
|
17534
|
+
context.translate(b.x1, b.y1);
|
|
17535
|
+
context.fillRect(0, 0, targetW, targetH);
|
|
17536
|
+
context.translate(-b.x1, -b.y1);
|
|
17366
17537
|
}
|
|
17367
|
-
const defaultBaseBackgroundRenderContribution = new DefaultBaseBackgroundRenderContribution();
|
|
17368
17538
|
let DefaultBaseInteractiveRenderContribution = class DefaultBaseInteractiveRenderContribution {
|
|
17369
17539
|
constructor(subRenderContribitions) {
|
|
17370
17540
|
this.subRenderContribitions = subRenderContribitions;
|
|
@@ -17807,31 +17977,35 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
|
|
|
17807
17977
|
this.time = BaseRenderContributionTime.beforeFillStroke;
|
|
17808
17978
|
}
|
|
17809
17979
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
17810
|
-
const { background, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY } = graphic.attribute;
|
|
17980
|
+
const { background, backgroundOpacity = graphicAttribute.backgroundOpacity, opacity = graphicAttribute.opacity, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY, backgroundClip = graphicAttribute.backgroundClip, backgroundPosition = graphicAttribute.backgroundPosition } = graphic.attribute;
|
|
17811
17981
|
if (!background) {
|
|
17812
17982
|
return;
|
|
17813
17983
|
}
|
|
17814
17984
|
if (graphic.backgroundImg && graphic.resources) {
|
|
17815
|
-
const res = graphic.resources.get(background);
|
|
17816
|
-
if (res.state !== 'success' || !res.data) {
|
|
17985
|
+
const res = graphic.resources.get(getBackgroundImage(background));
|
|
17986
|
+
if (!res || res.state !== 'success' || !res.data) {
|
|
17817
17987
|
return;
|
|
17818
17988
|
}
|
|
17819
17989
|
context.highPerformanceSave();
|
|
17820
17990
|
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
|
|
17821
17991
|
const b = graphic.AABBBounds;
|
|
17992
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
17993
|
+
backgroundClip && context.clip();
|
|
17822
17994
|
this.doDrawImage(context, res.data, b, {
|
|
17823
17995
|
backgroundMode,
|
|
17824
17996
|
backgroundFit,
|
|
17825
17997
|
backgroundKeepAspectRatio,
|
|
17826
17998
|
backgroundScale,
|
|
17827
17999
|
backgroundOffsetX,
|
|
17828
|
-
backgroundOffsetY
|
|
18000
|
+
backgroundOffsetY,
|
|
18001
|
+
backgroundPosition
|
|
17829
18002
|
});
|
|
17830
18003
|
context.highPerformanceRestore();
|
|
17831
18004
|
context.setTransformForCurrent();
|
|
17832
18005
|
}
|
|
17833
18006
|
else {
|
|
17834
18007
|
context.highPerformanceSave();
|
|
18008
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
17835
18009
|
context.fillStyle = background;
|
|
17836
18010
|
context.fill();
|
|
17837
18011
|
context.highPerformanceRestore();
|
|
@@ -19977,7 +20151,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
19977
20151
|
}
|
|
19978
20152
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
19979
20153
|
var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
19980
|
-
const { backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio } = graphic.attribute;
|
|
20154
|
+
const { backgroundOpacity = graphicAttribute.backgroundOpacity, opacity = graphicAttribute.opacity, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY, backgroundPosition = graphicAttribute.backgroundPosition, backgroundClip = graphicAttribute.backgroundClip, backgroundCornerRadius = graphicAttribute.backgroundCornerRadius } = graphic.attribute;
|
|
19981
20155
|
let { background } = graphic.attribute;
|
|
19982
20156
|
if (!background) {
|
|
19983
20157
|
return;
|
|
@@ -20000,20 +20174,20 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20000
20174
|
};
|
|
20001
20175
|
save();
|
|
20002
20176
|
let b;
|
|
20003
|
-
const
|
|
20177
|
+
const backgroundConfig = isObject(background) && background.background ? background : null;
|
|
20004
20178
|
const onlyTranslate = graphic.transMatrix.onlyTranslate();
|
|
20005
|
-
if (
|
|
20179
|
+
if (backgroundConfig) {
|
|
20006
20180
|
const _b = graphic.AABBBounds;
|
|
20007
|
-
const x = ((_a =
|
|
20008
|
-
const y = ((_d =
|
|
20009
|
-
const w = (_f =
|
|
20010
|
-
const h = (_g =
|
|
20181
|
+
const x = ((_a = backgroundConfig.x) !== null && _a !== void 0 ? _a : _b.x1) + ((_c = backgroundConfig.dx) !== null && _c !== void 0 ? _c : 0);
|
|
20182
|
+
const y = ((_d = backgroundConfig.y) !== null && _d !== void 0 ? _d : _b.y1) + ((_e = backgroundConfig.dy) !== null && _e !== void 0 ? _e : 0);
|
|
20183
|
+
const w = (_f = backgroundConfig.width) !== null && _f !== void 0 ? _f : _b.width();
|
|
20184
|
+
const h = (_g = backgroundConfig.height) !== null && _g !== void 0 ? _g : _b.height();
|
|
20011
20185
|
b = boundsAllocate.allocate(x, y, x + w, y + h);
|
|
20012
|
-
background =
|
|
20186
|
+
background = backgroundConfig.background;
|
|
20013
20187
|
if (!onlyTranslate) {
|
|
20014
20188
|
const w = b.width();
|
|
20015
20189
|
const h = b.height();
|
|
20016
|
-
b.set(((_h =
|
|
20190
|
+
b.set(((_h = backgroundConfig.x) !== null && _h !== void 0 ? _h : 0) + ((_j = backgroundConfig.dx) !== null && _j !== void 0 ? _j : 0), ((_k = backgroundConfig.y) !== null && _k !== void 0 ? _k : 0) + ((_l = backgroundConfig.dy) !== null && _l !== void 0 ? _l : 0), w, h);
|
|
20017
20191
|
}
|
|
20018
20192
|
}
|
|
20019
20193
|
else {
|
|
@@ -20024,7 +20198,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20024
20198
|
}
|
|
20025
20199
|
if (graphic.backgroundImg && graphic.resources) {
|
|
20026
20200
|
const res = graphic.resources.get(background);
|
|
20027
|
-
if (res.state !== 'success' || !res.data) {
|
|
20201
|
+
if (!res || res.state !== 'success' || !res.data) {
|
|
20028
20202
|
restore();
|
|
20029
20203
|
return;
|
|
20030
20204
|
}
|
|
@@ -20033,16 +20207,33 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20033
20207
|
else {
|
|
20034
20208
|
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
|
|
20035
20209
|
}
|
|
20036
|
-
context.
|
|
20037
|
-
|
|
20210
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
20211
|
+
if (backgroundClip) {
|
|
20212
|
+
context.beginPath();
|
|
20213
|
+
if (backgroundCornerRadius) {
|
|
20214
|
+
createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, true);
|
|
20215
|
+
}
|
|
20216
|
+
else {
|
|
20217
|
+
context.rect(b.x1, b.y1, b.width(), b.height());
|
|
20218
|
+
}
|
|
20219
|
+
context.clip();
|
|
20220
|
+
}
|
|
20221
|
+
this.doDrawImage(context, res.data, b, {
|
|
20222
|
+
backgroundMode,
|
|
20223
|
+
backgroundFit,
|
|
20224
|
+
backgroundKeepAspectRatio,
|
|
20225
|
+
backgroundScale,
|
|
20226
|
+
backgroundOffsetX,
|
|
20227
|
+
backgroundOffsetY,
|
|
20228
|
+
backgroundPosition
|
|
20229
|
+
});
|
|
20038
20230
|
context.highPerformanceRestore();
|
|
20039
20231
|
context.setTransformForCurrent();
|
|
20040
20232
|
}
|
|
20041
20233
|
else {
|
|
20042
|
-
const { backgroundCornerRadius, backgroundOpacity = 1 } = graphic.attribute;
|
|
20043
20234
|
context.highPerformanceSave();
|
|
20044
20235
|
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
|
|
20045
|
-
context.globalAlpha = backgroundOpacity;
|
|
20236
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
20046
20237
|
context.fillStyle = background;
|
|
20047
20238
|
if (backgroundCornerRadius) {
|
|
20048
20239
|
createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, true);
|
|
@@ -20053,7 +20244,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20053
20244
|
}
|
|
20054
20245
|
context.highPerformanceRestore();
|
|
20055
20246
|
}
|
|
20056
|
-
if (
|
|
20247
|
+
if (backgroundConfig) {
|
|
20057
20248
|
boundsAllocate.free(b);
|
|
20058
20249
|
}
|
|
20059
20250
|
restore();
|
|
@@ -20638,6 +20829,75 @@ DefaultCanvasGroupRender = __decorate([
|
|
|
20638
20829
|
], DefaultCanvasGroupRender);
|
|
20639
20830
|
|
|
20640
20831
|
const repeatStr = ['', 'repeat-x', 'repeat-y', 'repeat'];
|
|
20832
|
+
function resolveImageMode({ repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode }) {
|
|
20833
|
+
const repeatMode = resolveImageRepeatMode(repeatX, repeatY);
|
|
20834
|
+
return {
|
|
20835
|
+
repeatMode,
|
|
20836
|
+
sizingMode: repeatMode === 'no-repeat' ? imageMode !== null && imageMode !== void 0 ? imageMode : 'fill' : 'fill'
|
|
20837
|
+
};
|
|
20838
|
+
}
|
|
20839
|
+
const IMAGE_MODE_TO_BACKGROUND_MODE = {
|
|
20840
|
+
cover: 'no-repeat-cover',
|
|
20841
|
+
contain: 'no-repeat-contain',
|
|
20842
|
+
fill: 'no-repeat-fill',
|
|
20843
|
+
auto: 'no-repeat-auto'
|
|
20844
|
+
};
|
|
20845
|
+
function resolveBackgroundParamsByImageSizing(sizingMode) {
|
|
20846
|
+
return {
|
|
20847
|
+
backgroundMode: IMAGE_MODE_TO_BACKGROUND_MODE[sizingMode],
|
|
20848
|
+
backgroundFit: false,
|
|
20849
|
+
backgroundKeepAspectRatio: false
|
|
20850
|
+
};
|
|
20851
|
+
}
|
|
20852
|
+
function resolveImageRepeatMode(repeatX, repeatY) {
|
|
20853
|
+
let repeat = 0;
|
|
20854
|
+
if (repeatX === 'repeat') {
|
|
20855
|
+
repeat |= 0b0001;
|
|
20856
|
+
}
|
|
20857
|
+
if (repeatY === 'repeat') {
|
|
20858
|
+
repeat |= 0b0010;
|
|
20859
|
+
}
|
|
20860
|
+
return repeat ? repeatStr[repeat] : 'no-repeat';
|
|
20861
|
+
}
|
|
20862
|
+
function shouldClipImageByLayout({ repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode, imageScale = 1, imageOffsetX = 0, imageOffsetY = 0, imagePosition = 'top-left' }) {
|
|
20863
|
+
const { repeatMode, sizingMode } = resolveImageMode({
|
|
20864
|
+
repeatX,
|
|
20865
|
+
repeatY,
|
|
20866
|
+
imageMode
|
|
20867
|
+
});
|
|
20868
|
+
return (repeatMode === 'no-repeat' &&
|
|
20869
|
+
(sizingMode === 'cover' || sizingMode === 'auto' || imageScale !== 1 || imageOffsetX !== 0 || imageOffsetY !== 0));
|
|
20870
|
+
}
|
|
20871
|
+
function drawImageWithLayout(context, data, x, y, width, height, { repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode, imageScale = 1, imageOffsetX = 0, imageOffsetY = 0, imagePosition = 'top-left' }) {
|
|
20872
|
+
const { repeatMode, sizingMode } = resolveImageMode({
|
|
20873
|
+
repeatX,
|
|
20874
|
+
repeatY,
|
|
20875
|
+
imageMode
|
|
20876
|
+
});
|
|
20877
|
+
const imageBackgroundParams = repeatMode === 'no-repeat'
|
|
20878
|
+
? resolveBackgroundParamsByImageSizing(sizingMode)
|
|
20879
|
+
: {
|
|
20880
|
+
backgroundMode: repeatMode,
|
|
20881
|
+
backgroundFit: false,
|
|
20882
|
+
backgroundKeepAspectRatio: false
|
|
20883
|
+
};
|
|
20884
|
+
drawBackgroundImage(context, data, {
|
|
20885
|
+
x1: x,
|
|
20886
|
+
y1: y,
|
|
20887
|
+
x2: x + width,
|
|
20888
|
+
y2: y + height,
|
|
20889
|
+
width: () => width,
|
|
20890
|
+
height: () => height
|
|
20891
|
+
}, {
|
|
20892
|
+
backgroundMode: imageBackgroundParams.backgroundMode,
|
|
20893
|
+
backgroundFit: imageBackgroundParams.backgroundFit,
|
|
20894
|
+
backgroundKeepAspectRatio: imageBackgroundParams.backgroundKeepAspectRatio,
|
|
20895
|
+
backgroundScale: imageScale,
|
|
20896
|
+
backgroundOffsetX: imageOffsetX,
|
|
20897
|
+
backgroundOffsetY: imageOffsetY,
|
|
20898
|
+
backgroundPosition: imagePosition
|
|
20899
|
+
});
|
|
20900
|
+
}
|
|
20641
20901
|
let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
|
|
20642
20902
|
constructor(graphicRenderContributions) {
|
|
20643
20903
|
super();
|
|
@@ -20648,7 +20908,7 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20648
20908
|
}
|
|
20649
20909
|
drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
20650
20910
|
const imageAttribute = getTheme(image).image;
|
|
20651
|
-
const { repeatX = imageAttribute.repeatX, repeatY = imageAttribute.repeatY, x: originX = imageAttribute.x, y: originY = imageAttribute.y, cornerRadius = imageAttribute.cornerRadius, fillStrokeOrder = imageAttribute.fillStrokeOrder, cornerType = imageAttribute.cornerType, image: url } = image.attribute;
|
|
20911
|
+
const { repeatX = imageAttribute.repeatX, repeatY = imageAttribute.repeatY, x: originX = imageAttribute.x, y: originY = imageAttribute.y, cornerRadius = imageAttribute.cornerRadius, fillStrokeOrder = imageAttribute.fillStrokeOrder, cornerType = imageAttribute.cornerType, imageMode = imageAttribute.imageMode, imageScale = imageAttribute.imageScale, imageOffsetX = imageAttribute.imageOffsetX, imageOffsetY = imageAttribute.imageOffsetY, imagePosition = imageAttribute.imagePosition, image: url } = image.attribute;
|
|
20652
20912
|
const data = this.valid(image, imageAttribute, fillCb);
|
|
20653
20913
|
if (!data) {
|
|
20654
20914
|
return;
|
|
@@ -20664,13 +20924,13 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20664
20924
|
const width = image.width;
|
|
20665
20925
|
const height = image.height;
|
|
20666
20926
|
context.beginPath();
|
|
20667
|
-
let
|
|
20927
|
+
let needCornerClip = false;
|
|
20668
20928
|
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
20669
20929
|
context.rect(x, y, width, height);
|
|
20670
20930
|
}
|
|
20671
20931
|
else {
|
|
20672
20932
|
createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');
|
|
20673
|
-
|
|
20933
|
+
needCornerClip = true;
|
|
20674
20934
|
}
|
|
20675
20935
|
context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
|
|
20676
20936
|
const _runFill = () => {
|
|
@@ -20680,23 +20940,15 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20680
20940
|
}
|
|
20681
20941
|
else if (fVisible) {
|
|
20682
20942
|
context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
|
|
20683
|
-
|
|
20684
|
-
|
|
20685
|
-
|
|
20686
|
-
|
|
20687
|
-
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
context.fillStyle = pattern;
|
|
20693
|
-
context.translate(x, y, true);
|
|
20694
|
-
context.fillRect(0, 0, width, height);
|
|
20695
|
-
context.translate(-x, -y, true);
|
|
20696
|
-
}
|
|
20697
|
-
else {
|
|
20698
|
-
context.drawImage(res.data, x, y, width, height);
|
|
20699
|
-
}
|
|
20943
|
+
drawImageWithLayout(context, res.data, x, y, width, height, {
|
|
20944
|
+
repeatX,
|
|
20945
|
+
repeatY,
|
|
20946
|
+
imageMode,
|
|
20947
|
+
imageScale,
|
|
20948
|
+
imageOffsetX,
|
|
20949
|
+
imageOffsetY,
|
|
20950
|
+
imagePosition
|
|
20951
|
+
});
|
|
20700
20952
|
}
|
|
20701
20953
|
}
|
|
20702
20954
|
};
|
|
@@ -20711,27 +20963,37 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20711
20963
|
}
|
|
20712
20964
|
}
|
|
20713
20965
|
};
|
|
20966
|
+
const needLayoutClip = shouldClipImageByLayout({
|
|
20967
|
+
repeatX,
|
|
20968
|
+
repeatY,
|
|
20969
|
+
imageMode,
|
|
20970
|
+
imageScale,
|
|
20971
|
+
imageOffsetX,
|
|
20972
|
+
imageOffsetY,
|
|
20973
|
+
imagePosition
|
|
20974
|
+
});
|
|
20975
|
+
const needClip = needCornerClip || needLayoutClip;
|
|
20714
20976
|
if (!fillStrokeOrder) {
|
|
20715
|
-
if (
|
|
20977
|
+
if (needClip) {
|
|
20716
20978
|
context.save();
|
|
20717
20979
|
context.clip();
|
|
20718
20980
|
}
|
|
20719
20981
|
this.beforeRenderStep(image, context, x, y, doFill, false, fVisible, false, imageAttribute, drawContext, fillCb);
|
|
20720
20982
|
_runFill();
|
|
20721
|
-
if (
|
|
20983
|
+
if (needClip) {
|
|
20722
20984
|
context.restore();
|
|
20723
20985
|
}
|
|
20724
20986
|
_runStroke();
|
|
20725
20987
|
}
|
|
20726
20988
|
else {
|
|
20727
20989
|
_runStroke();
|
|
20728
|
-
if (
|
|
20990
|
+
if (needClip) {
|
|
20729
20991
|
context.save();
|
|
20730
20992
|
context.clip();
|
|
20731
20993
|
}
|
|
20732
20994
|
this.beforeRenderStep(image, context, x, y, doFill, false, fVisible, false, imageAttribute, drawContext, fillCb);
|
|
20733
20995
|
_runFill();
|
|
20734
|
-
if (
|
|
20996
|
+
if (needClip) {
|
|
20735
20997
|
context.restore();
|
|
20736
20998
|
}
|
|
20737
20999
|
}
|
|
@@ -21985,7 +22247,7 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
21985
22247
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
21986
22248
|
}
|
|
21987
22249
|
clearScreen(renderService, context, drawContext) {
|
|
21988
|
-
var _a, _b, _c;
|
|
22250
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
21989
22251
|
const { clear, viewBox } = drawContext;
|
|
21990
22252
|
const x = 0;
|
|
21991
22253
|
const y = 0;
|
|
@@ -21997,11 +22259,24 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
21997
22259
|
renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
|
|
21998
22260
|
}
|
|
21999
22261
|
const stage = (_b = renderService.drawParams) === null || _b === void 0 ? void 0 : _b.stage;
|
|
22000
|
-
|
|
22262
|
+
if (stage) {
|
|
22263
|
+
context.globalAlpha =
|
|
22264
|
+
((_c = stage.attribute.opacity) !== null && _c !== void 0 ? _c : 1) * ((_d = stage.attribute.backgroundOpacity) !== null && _d !== void 0 ? _d : 1);
|
|
22265
|
+
}
|
|
22001
22266
|
if (stage && stage.backgroundImg && stage.resources) {
|
|
22002
|
-
const res = stage.resources.get(clear);
|
|
22267
|
+
const res = stage.resources.get(getBackgroundImage(clear));
|
|
22003
22268
|
if (res && res.state === 'success' && res.data) {
|
|
22004
|
-
|
|
22269
|
+
const backgroundBounds = boundsAllocate.allocate(x, y, x + width, y + height);
|
|
22270
|
+
drawBackgroundImage(context, res.data, backgroundBounds, {
|
|
22271
|
+
backgroundMode: (_e = stage.attribute.backgroundMode) !== null && _e !== void 0 ? _e : DefaultAttribute.backgroundMode,
|
|
22272
|
+
backgroundFit: (_f = stage.attribute.backgroundFit) !== null && _f !== void 0 ? _f : DefaultAttribute.backgroundFit,
|
|
22273
|
+
backgroundKeepAspectRatio: (_g = stage.attribute.backgroundKeepAspectRatio) !== null && _g !== void 0 ? _g : DefaultAttribute.backgroundKeepAspectRatio,
|
|
22274
|
+
backgroundScale: (_h = stage.attribute.backgroundScale) !== null && _h !== void 0 ? _h : DefaultAttribute.backgroundScale,
|
|
22275
|
+
backgroundOffsetX: (_j = stage.attribute.backgroundOffsetX) !== null && _j !== void 0 ? _j : DefaultAttribute.backgroundOffsetX,
|
|
22276
|
+
backgroundOffsetY: (_k = stage.attribute.backgroundOffsetY) !== null && _k !== void 0 ? _k : DefaultAttribute.backgroundOffsetY,
|
|
22277
|
+
backgroundPosition: (_l = stage.attribute.backgroundPosition) !== null && _l !== void 0 ? _l : DefaultAttribute.backgroundPosition
|
|
22278
|
+
});
|
|
22279
|
+
boundsAllocate.free(backgroundBounds);
|
|
22005
22280
|
}
|
|
22006
22281
|
}
|
|
22007
22282
|
else {
|
|
@@ -22767,6 +23042,7 @@ class Stage extends Group {
|
|
|
22767
23042
|
}
|
|
22768
23043
|
set background(b) {
|
|
22769
23044
|
this._background = b;
|
|
23045
|
+
this.syncBackgroundImage(b);
|
|
22770
23046
|
}
|
|
22771
23047
|
get defaultLayer() {
|
|
22772
23048
|
return this.at(0);
|
|
@@ -22786,6 +23062,30 @@ class Stage extends Group {
|
|
|
22786
23062
|
this._ticker = ticker;
|
|
22787
23063
|
this._ticker.on('tick', this.afterTickCb);
|
|
22788
23064
|
}
|
|
23065
|
+
syncBackgroundImage(background) {
|
|
23066
|
+
var _a;
|
|
23067
|
+
const source = (_a = background === null || background === void 0 ? void 0 : background.background) !== null && _a !== void 0 ? _a : background;
|
|
23068
|
+
this.backgroundImg = false;
|
|
23069
|
+
if (this.isImageBackgroundSource(source)) {
|
|
23070
|
+
this.loadImage(source, true);
|
|
23071
|
+
}
|
|
23072
|
+
}
|
|
23073
|
+
isImageBackgroundSource(source) {
|
|
23074
|
+
if (!source) {
|
|
23075
|
+
return false;
|
|
23076
|
+
}
|
|
23077
|
+
if (typeof source === 'string') {
|
|
23078
|
+
return source.startsWith('<svg') || isValidUrl(source) || source.includes('/') || isBase64(source);
|
|
23079
|
+
}
|
|
23080
|
+
if (!isObject(source)) {
|
|
23081
|
+
return false;
|
|
23082
|
+
}
|
|
23083
|
+
const gradientSource = source;
|
|
23084
|
+
if (typeof gradientSource.gradient === 'string' && Array.isArray(gradientSource.stops)) {
|
|
23085
|
+
return false;
|
|
23086
|
+
}
|
|
23087
|
+
return true;
|
|
23088
|
+
}
|
|
22789
23089
|
constructor(params = {}) {
|
|
22790
23090
|
var _a, _b;
|
|
22791
23091
|
super({});
|
|
@@ -22902,8 +23202,8 @@ class Stage extends Group {
|
|
|
22902
23202
|
};
|
|
22903
23203
|
}
|
|
22904
23204
|
this.optmize(params.optimize);
|
|
22905
|
-
if (params.background
|
|
22906
|
-
this.
|
|
23205
|
+
if (params.background) {
|
|
23206
|
+
this.syncBackgroundImage(this._background);
|
|
22907
23207
|
}
|
|
22908
23208
|
this.initAnimate(params);
|
|
22909
23209
|
this.rafId = (_b = params.rafId) !== null && _b !== void 0 ? _b : Math.floor(Math.random() * 6);
|
|
@@ -28082,4 +28382,4 @@ const registerFlexLayoutPlugin = () => {
|
|
|
28082
28382
|
Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
|
|
28083
28383
|
};
|
|
28084
28384
|
|
|
28085
|
-
export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, 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, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, 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, 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, Star, StarRender, StarRenderContribution, 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, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createEventTransformer, createGlyph, createGroup, createImage, createLine, createMat4, 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, 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, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiInject, multiplyMat4Mat3, multiplyMat4Mat4, named, 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, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, 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 };
|
|
28385
|
+
export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, 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, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, 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, 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, Star, StarRender, StarRenderContribution, 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, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createEventTransformer, createGlyph, createGroup, createImage, createLine, createMat4, 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, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNoRepeatSizingMode, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiInject, multiplyMat4Mat3, multiplyMat4Mat4, named, 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, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, 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 };
|