@visactor/vrender-core 1.0.46-alpha.0 → 1.0.46-alpha.1
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/canvas/empty-context.js +1 -2
- package/cjs/common/diff.js +1 -2
- package/cjs/common/event-transformer.js +2 -1
- 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 +1 -2
- 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/application.js +1 -1
- package/cjs/core/camera.js +1 -1
- package/cjs/core/constants.js +1 -1
- package/cjs/core/core-modules.js +1 -1
- package/cjs/core/global-module.js +2 -0
- 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 +2 -1
- 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/event/constant.js +1 -1
- package/cjs/event/event-manager.js +1 -1
- package/cjs/graphic/config.js +10 -2
- 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 +31 -3
- 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/base-texture-contribution-render.js +15 -3
- package/cjs/render/contributions/render/contributions/base-texture-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 +436 -115
- package/es/canvas/constants.js +2 -1
- package/es/canvas/empty-context.js +1 -2
- package/es/common/diff.js +1 -2
- package/es/common/event-transformer.js +2 -1
- 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 +1 -2
- 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/application.js +1 -1
- package/es/core/camera.js +1 -1
- package/es/core/constants.js +1 -1
- package/es/core/core-modules.js +1 -1
- package/es/core/global-module.js +2 -0
- 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 +2 -1
- 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/event/constant.js +1 -1
- package/es/event/event-manager.js +1 -1
- package/es/graphic/config.js +10 -2
- 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 +31 -3
- 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/base-texture-contribution-render.js +15 -3
- package/es/render/contributions/render/contributions/base-texture-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 +4 -4
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:
|
|
3566
|
+
const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({ forceBoundsWidth: undefined, forceBoundsHeight: undefined, opacity: 1, background: null, autoAnimateTexture: false, textureRatio: 1, textureOptions: { alignToGraphic: true }, 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 () {
|
|
@@ -12079,7 +12079,14 @@ class Graphic extends Node {
|
|
|
12079
12079
|
return this.pathProxy;
|
|
12080
12080
|
}
|
|
12081
12081
|
loadImage(image, background = false) {
|
|
12082
|
-
if (
|
|
12082
|
+
if (background && (image === null || image === void 0 ? void 0 : image.background)) {
|
|
12083
|
+
image = image.background;
|
|
12084
|
+
}
|
|
12085
|
+
if (background && (!image || backgroundNotImage(image))) {
|
|
12086
|
+
this.backgroundImg = false;
|
|
12087
|
+
return;
|
|
12088
|
+
}
|
|
12089
|
+
if (!image) {
|
|
12083
12090
|
return;
|
|
12084
12091
|
}
|
|
12085
12092
|
const url = image;
|
|
@@ -12191,9 +12198,15 @@ class Graphic extends Node {
|
|
|
12191
12198
|
Graphic.userSymbolMap = {};
|
|
12192
12199
|
Graphic.mixin(EventTarget);
|
|
12193
12200
|
function backgroundNotImage(image) {
|
|
12201
|
+
if (typeof image === 'string') {
|
|
12202
|
+
return !(image.startsWith('<svg') || isValidUrl(image) || image.includes('/') || isBase64(image));
|
|
12203
|
+
}
|
|
12194
12204
|
if (image.fill || image.stroke) {
|
|
12195
12205
|
return true;
|
|
12196
12206
|
}
|
|
12207
|
+
if (typeof image.gradient === 'string' && Array.isArray(image.stops)) {
|
|
12208
|
+
return true;
|
|
12209
|
+
}
|
|
12197
12210
|
return false;
|
|
12198
12211
|
}
|
|
12199
12212
|
function isExternalTexture(texture) {
|
|
@@ -15331,7 +15344,17 @@ function seperateParagraph(paragraph, index) {
|
|
|
15331
15344
|
return [p1, p2];
|
|
15332
15345
|
}
|
|
15333
15346
|
|
|
15334
|
-
const IMAGE_UPDATE_TAG_KEY = [
|
|
15347
|
+
const IMAGE_UPDATE_TAG_KEY = [
|
|
15348
|
+
'width',
|
|
15349
|
+
'height',
|
|
15350
|
+
'image',
|
|
15351
|
+
'imageMode',
|
|
15352
|
+
'imagePosition',
|
|
15353
|
+
'imageScale',
|
|
15354
|
+
'imageOffsetX',
|
|
15355
|
+
'imageOffsetY',
|
|
15356
|
+
...GRAPHIC_UPDATE_TAG_KEY
|
|
15357
|
+
];
|
|
15335
15358
|
class Image extends Graphic {
|
|
15336
15359
|
constructor(params) {
|
|
15337
15360
|
super(params);
|
|
@@ -15477,7 +15500,7 @@ class Image extends Graphic {
|
|
|
15477
15500
|
return Image.NOWORK_ANIMATE_ATTR;
|
|
15478
15501
|
}
|
|
15479
15502
|
}
|
|
15480
|
-
Image.NOWORK_ANIMATE_ATTR = Object.assign({ image: 1, repeatX: 1, repeatY: 1 }, NOWORK_ANIMATE_ATTR);
|
|
15503
|
+
Image.NOWORK_ANIMATE_ATTR = Object.assign({ image: 1, imageMode: 1, repeatX: 1, repeatY: 1 }, NOWORK_ANIMATE_ATTR);
|
|
15481
15504
|
function createImage(attributes) {
|
|
15482
15505
|
return new Image(attributes);
|
|
15483
15506
|
}
|
|
@@ -17298,13 +17321,13 @@ class DefaultBaseBackgroundRenderContribution {
|
|
|
17298
17321
|
}
|
|
17299
17322
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
|
|
17300
17323
|
var _a;
|
|
17301
|
-
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;
|
|
17324
|
+
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;
|
|
17302
17325
|
if (!background) {
|
|
17303
17326
|
return;
|
|
17304
17327
|
}
|
|
17305
17328
|
if (graphic.backgroundImg && graphic.resources) {
|
|
17306
|
-
const res = graphic.resources.get(background);
|
|
17307
|
-
if (res.state !== 'success' || !res.data) {
|
|
17329
|
+
const res = graphic.resources.get(getBackgroundImage(background));
|
|
17330
|
+
if (!res || res.state !== 'success' || !res.data) {
|
|
17308
17331
|
return;
|
|
17309
17332
|
}
|
|
17310
17333
|
context.save();
|
|
@@ -17324,7 +17347,8 @@ class DefaultBaseBackgroundRenderContribution {
|
|
|
17324
17347
|
backgroundKeepAspectRatio,
|
|
17325
17348
|
backgroundScale,
|
|
17326
17349
|
backgroundOffsetX,
|
|
17327
|
-
backgroundOffsetY
|
|
17350
|
+
backgroundOffsetY,
|
|
17351
|
+
backgroundPosition
|
|
17328
17352
|
});
|
|
17329
17353
|
context.restore();
|
|
17330
17354
|
if (!graphic.transMatrix.onlyTranslate()) {
|
|
@@ -17341,65 +17365,211 @@ class DefaultBaseBackgroundRenderContribution {
|
|
|
17341
17365
|
}
|
|
17342
17366
|
}
|
|
17343
17367
|
doDrawImage(context, data, b, params) {
|
|
17344
|
-
|
|
17345
|
-
|
|
17346
|
-
|
|
17347
|
-
|
|
17348
|
-
|
|
17349
|
-
|
|
17350
|
-
|
|
17351
|
-
|
|
17352
|
-
|
|
17353
|
-
|
|
17354
|
-
|
|
17355
|
-
|
|
17356
|
-
|
|
17357
|
-
|
|
17358
|
-
|
|
17359
|
-
|
|
17360
|
-
|
|
17361
|
-
|
|
17362
|
-
|
|
17363
|
-
|
|
17368
|
+
drawBackgroundImage(context, data, b, params);
|
|
17369
|
+
}
|
|
17370
|
+
}
|
|
17371
|
+
const defaultBaseBackgroundRenderContribution = new DefaultBaseBackgroundRenderContribution();
|
|
17372
|
+
const verticalPositionKeywords = new Set(['top', 'center', 'bottom']);
|
|
17373
|
+
function getBackgroundImage(background) {
|
|
17374
|
+
var _a;
|
|
17375
|
+
return (_a = background === null || background === void 0 ? void 0 : background.background) !== null && _a !== void 0 ? _a : background;
|
|
17376
|
+
}
|
|
17377
|
+
function resolveBackgroundSizing({ backgroundFit, backgroundKeepAspectRatio }) {
|
|
17378
|
+
if (backgroundFit) {
|
|
17379
|
+
return backgroundKeepAspectRatio ? 'cover' : 'fill';
|
|
17380
|
+
}
|
|
17381
|
+
return 'auto';
|
|
17382
|
+
}
|
|
17383
|
+
function isNoRepeatSizingMode(mode) {
|
|
17384
|
+
return typeof mode === 'string' && mode.startsWith('no-repeat-');
|
|
17385
|
+
}
|
|
17386
|
+
const NO_REPEAT_SIZING_MAP = {
|
|
17387
|
+
'no-repeat-cover': 'cover',
|
|
17388
|
+
'no-repeat-contain': 'contain',
|
|
17389
|
+
'no-repeat-fill': 'fill',
|
|
17390
|
+
'no-repeat-auto': 'auto'
|
|
17391
|
+
};
|
|
17392
|
+
function resolveBackgroundDrawMode({ backgroundMode, backgroundFit, backgroundKeepAspectRatio }) {
|
|
17393
|
+
const sizing = NO_REPEAT_SIZING_MAP[backgroundMode];
|
|
17394
|
+
if (sizing) {
|
|
17395
|
+
return {
|
|
17396
|
+
backgroundRepeatMode: 'no-repeat',
|
|
17397
|
+
backgroundSizing: sizing
|
|
17398
|
+
};
|
|
17399
|
+
}
|
|
17400
|
+
return {
|
|
17401
|
+
backgroundRepeatMode: backgroundMode,
|
|
17402
|
+
backgroundSizing: resolveBackgroundSizing({
|
|
17403
|
+
backgroundFit,
|
|
17404
|
+
backgroundKeepAspectRatio
|
|
17405
|
+
})
|
|
17406
|
+
};
|
|
17407
|
+
}
|
|
17408
|
+
function isPercentageValue(value) {
|
|
17409
|
+
return /^-?\d+(\.\d+)?%$/.test(value);
|
|
17410
|
+
}
|
|
17411
|
+
function parsePositionToken(value, remainSpace, startKeyword, centerKeyword, endKeyword) {
|
|
17412
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
17413
|
+
return value;
|
|
17414
|
+
}
|
|
17415
|
+
const normalizedValue = `${value !== null && value !== void 0 ? value : ''}`.trim().toLowerCase();
|
|
17416
|
+
if (!normalizedValue || normalizedValue === startKeyword) {
|
|
17417
|
+
return 0;
|
|
17418
|
+
}
|
|
17419
|
+
if (normalizedValue === centerKeyword) {
|
|
17420
|
+
return remainSpace / 2;
|
|
17421
|
+
}
|
|
17422
|
+
if (normalizedValue === endKeyword) {
|
|
17423
|
+
return remainSpace;
|
|
17424
|
+
}
|
|
17425
|
+
if (isPercentageValue(normalizedValue)) {
|
|
17426
|
+
return (remainSpace * parseFloat(normalizedValue)) / 100;
|
|
17427
|
+
}
|
|
17428
|
+
const parsedValue = Number(normalizedValue);
|
|
17429
|
+
if (Number.isFinite(parsedValue)) {
|
|
17430
|
+
return parsedValue;
|
|
17431
|
+
}
|
|
17432
|
+
return 0;
|
|
17433
|
+
}
|
|
17434
|
+
function normalizeBackgroundPosition(position) {
|
|
17435
|
+
var _a, _b;
|
|
17436
|
+
if (Array.isArray(position)) {
|
|
17437
|
+
return [(_a = position[0]) !== null && _a !== void 0 ? _a : 'left', (_b = position[1]) !== null && _b !== void 0 ? _b : 'top'];
|
|
17438
|
+
}
|
|
17439
|
+
const normalizedPosition = `${position !== null && position !== void 0 ? position : 'top-left'}`.trim().toLowerCase().replace(/-/g, ' ');
|
|
17440
|
+
const tokens = normalizedPosition.split(/\s+/).filter(Boolean);
|
|
17441
|
+
if (tokens.length === 0) {
|
|
17442
|
+
return ['left', 'top'];
|
|
17443
|
+
}
|
|
17444
|
+
if (tokens.length === 1) {
|
|
17445
|
+
const token = tokens[0];
|
|
17446
|
+
if (token === 'center') {
|
|
17447
|
+
return ['center', 'center'];
|
|
17364
17448
|
}
|
|
17365
|
-
|
|
17366
|
-
|
|
17367
|
-
|
|
17368
|
-
|
|
17369
|
-
|
|
17370
|
-
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
|
|
17374
|
-
|
|
17375
|
-
|
|
17376
|
-
|
|
17377
|
-
|
|
17378
|
-
|
|
17379
|
-
|
|
17380
|
-
|
|
17381
|
-
|
|
17382
|
-
if (ctx) {
|
|
17383
|
-
ctx.inuse = true;
|
|
17384
|
-
ctx.clearMatrix();
|
|
17385
|
-
ctx.setTransformForCurrent(true);
|
|
17386
|
-
ctx.clearRect(0, 0, w, h);
|
|
17387
|
-
ctx.drawImage(data, 0, 0, w, h);
|
|
17388
|
-
data = canvas.nativeCanvas;
|
|
17389
|
-
}
|
|
17390
|
-
canvasAllocate.free(canvas);
|
|
17391
|
-
}
|
|
17392
|
-
const dpr = context.dpr;
|
|
17393
|
-
const pattern = context.createPattern(data, backgroundMode);
|
|
17394
|
-
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0]));
|
|
17395
|
-
context.fillStyle = pattern;
|
|
17396
|
-
context.translate(b.x1, b.y1);
|
|
17397
|
-
context.fillRect(0, 0, targetW, targetH);
|
|
17398
|
-
context.translate(-b.x1, -b.y1);
|
|
17449
|
+
if (verticalPositionKeywords.has(token)) {
|
|
17450
|
+
return ['center', token];
|
|
17451
|
+
}
|
|
17452
|
+
return [token, 'center'];
|
|
17453
|
+
}
|
|
17454
|
+
let horizontal;
|
|
17455
|
+
let vertical;
|
|
17456
|
+
const genericTokens = [];
|
|
17457
|
+
for (let i = 0; i < 2; i++) {
|
|
17458
|
+
const token = tokens[i];
|
|
17459
|
+
if (token === 'left' || token === 'right') {
|
|
17460
|
+
horizontal = token;
|
|
17461
|
+
continue;
|
|
17462
|
+
}
|
|
17463
|
+
if (token === 'top' || token === 'bottom') {
|
|
17464
|
+
vertical = token;
|
|
17465
|
+
continue;
|
|
17399
17466
|
}
|
|
17467
|
+
genericTokens.push(token);
|
|
17400
17468
|
}
|
|
17469
|
+
if (horizontal == null && genericTokens.length) {
|
|
17470
|
+
horizontal = genericTokens.shift();
|
|
17471
|
+
}
|
|
17472
|
+
if (vertical == null && genericTokens.length) {
|
|
17473
|
+
vertical = genericTokens.shift();
|
|
17474
|
+
}
|
|
17475
|
+
return [horizontal !== null && horizontal !== void 0 ? horizontal : 'left', vertical !== null && vertical !== void 0 ? vertical : 'top'];
|
|
17476
|
+
}
|
|
17477
|
+
function resolveBackgroundPosition(position, remainWidth, remainHeight) {
|
|
17478
|
+
const [horizontalPosition, verticalPosition] = normalizeBackgroundPosition(position);
|
|
17479
|
+
return {
|
|
17480
|
+
x: parsePositionToken(horizontalPosition, remainWidth, 'left', 'center', 'right'),
|
|
17481
|
+
y: parsePositionToken(verticalPosition, remainHeight, 'top', 'center', 'bottom')
|
|
17482
|
+
};
|
|
17483
|
+
}
|
|
17484
|
+
function pickRenderableDimension(...values) {
|
|
17485
|
+
for (const value of values) {
|
|
17486
|
+
if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
|
|
17487
|
+
return value;
|
|
17488
|
+
}
|
|
17489
|
+
}
|
|
17490
|
+
return null;
|
|
17491
|
+
}
|
|
17492
|
+
function resolveRenderableImageSize(data) {
|
|
17493
|
+
if (!data) {
|
|
17494
|
+
return null;
|
|
17495
|
+
}
|
|
17496
|
+
const width = pickRenderableDimension(data.naturalWidth, data.videoWidth, data.width);
|
|
17497
|
+
const height = pickRenderableDimension(data.naturalHeight, data.videoHeight, data.height);
|
|
17498
|
+
if (width == null || height == null) {
|
|
17499
|
+
return null;
|
|
17500
|
+
}
|
|
17501
|
+
return { width, height };
|
|
17502
|
+
}
|
|
17503
|
+
function drawBackgroundImage(context, data, b, params) {
|
|
17504
|
+
var _a, _b;
|
|
17505
|
+
const { backgroundMode, backgroundFit, backgroundKeepAspectRatio, backgroundScale = 1, backgroundOffsetX = 0, backgroundOffsetY = 0, backgroundPosition = 'top-left' } = params;
|
|
17506
|
+
const targetW = b.width();
|
|
17507
|
+
const targetH = b.height();
|
|
17508
|
+
const sourceSize = resolveRenderableImageSize(data);
|
|
17509
|
+
const { backgroundRepeatMode, backgroundSizing: resolvedBackgroundSizing } = resolveBackgroundDrawMode({
|
|
17510
|
+
backgroundMode,
|
|
17511
|
+
backgroundFit,
|
|
17512
|
+
backgroundKeepAspectRatio
|
|
17513
|
+
});
|
|
17514
|
+
let w = targetW;
|
|
17515
|
+
let h = targetH;
|
|
17516
|
+
if (targetW <= 0 || targetH <= 0) {
|
|
17517
|
+
return;
|
|
17518
|
+
}
|
|
17519
|
+
if (backgroundRepeatMode === 'no-repeat') {
|
|
17520
|
+
let drawWidth = (_a = sourceSize === null || sourceSize === void 0 ? void 0 : sourceSize.width) !== null && _a !== void 0 ? _a : targetW;
|
|
17521
|
+
let drawHeight = (_b = sourceSize === null || sourceSize === void 0 ? void 0 : sourceSize.height) !== null && _b !== void 0 ? _b : targetH;
|
|
17522
|
+
if ((resolvedBackgroundSizing === 'cover' || resolvedBackgroundSizing === 'contain') && sourceSize) {
|
|
17523
|
+
const scale = resolvedBackgroundSizing === 'cover'
|
|
17524
|
+
? Math.max(targetW / sourceSize.width, targetH / sourceSize.height)
|
|
17525
|
+
: Math.min(targetW / sourceSize.width, targetH / sourceSize.height);
|
|
17526
|
+
drawWidth = sourceSize.width * scale;
|
|
17527
|
+
drawHeight = sourceSize.height * scale;
|
|
17528
|
+
}
|
|
17529
|
+
else if (resolvedBackgroundSizing === 'fill') {
|
|
17530
|
+
drawWidth = targetW;
|
|
17531
|
+
drawHeight = targetH;
|
|
17532
|
+
}
|
|
17533
|
+
drawWidth *= backgroundScale;
|
|
17534
|
+
drawHeight *= backgroundScale;
|
|
17535
|
+
const { x, y } = resolveBackgroundPosition(backgroundPosition, targetW - drawWidth, targetH - drawHeight);
|
|
17536
|
+
context.drawImage(data, b.x1 + x + backgroundOffsetX, b.y1 + y + backgroundOffsetY, drawWidth, drawHeight);
|
|
17537
|
+
return;
|
|
17538
|
+
}
|
|
17539
|
+
if (backgroundFit && backgroundRepeatMode !== 'repeat' && sourceSize) {
|
|
17540
|
+
const resW = sourceSize.width;
|
|
17541
|
+
const resH = sourceSize.height;
|
|
17542
|
+
if (backgroundRepeatMode === 'repeat-x') {
|
|
17543
|
+
const ratio = targetH / resH;
|
|
17544
|
+
w = resW * ratio;
|
|
17545
|
+
h = targetH;
|
|
17546
|
+
}
|
|
17547
|
+
else if (backgroundRepeatMode === 'repeat-y') {
|
|
17548
|
+
const ratio = targetW / resW;
|
|
17549
|
+
h = resH * ratio;
|
|
17550
|
+
w = targetW;
|
|
17551
|
+
}
|
|
17552
|
+
const dpr = context.dpr;
|
|
17553
|
+
const canvas = canvasAllocate.allocate({ width: w, height: h, dpr });
|
|
17554
|
+
const ctx = canvas.getContext('2d');
|
|
17555
|
+
if (ctx) {
|
|
17556
|
+
ctx.inuse = true;
|
|
17557
|
+
ctx.clearMatrix();
|
|
17558
|
+
ctx.setTransformForCurrent(true);
|
|
17559
|
+
ctx.clearRect(0, 0, w, h);
|
|
17560
|
+
ctx.drawImage(data, 0, 0, w, h);
|
|
17561
|
+
data = canvas.nativeCanvas;
|
|
17562
|
+
}
|
|
17563
|
+
canvasAllocate.free(canvas);
|
|
17564
|
+
}
|
|
17565
|
+
const dpr = context.dpr;
|
|
17566
|
+
const pattern = context.createPattern(data, backgroundRepeatMode);
|
|
17567
|
+
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0]));
|
|
17568
|
+
context.fillStyle = pattern;
|
|
17569
|
+
context.translate(b.x1, b.y1);
|
|
17570
|
+
context.fillRect(0, 0, targetW, targetH);
|
|
17571
|
+
context.translate(-b.x1, -b.y1);
|
|
17401
17572
|
}
|
|
17402
|
-
const defaultBaseBackgroundRenderContribution = new DefaultBaseBackgroundRenderContribution();
|
|
17403
17573
|
let DefaultBaseInteractiveRenderContribution = class DefaultBaseInteractiveRenderContribution {
|
|
17404
17574
|
constructor(subRenderContribitions) {
|
|
17405
17575
|
this.subRenderContribitions = subRenderContribitions;
|
|
@@ -17632,7 +17802,7 @@ class DefaultBaseTextureRenderContribution {
|
|
|
17632
17802
|
this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
|
|
17633
17803
|
}
|
|
17634
17804
|
drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding) {
|
|
17635
|
-
var _a;
|
|
17805
|
+
var _a, _b, _c, _d, _e;
|
|
17636
17806
|
const { textureRatio = graphicAttribute.textureRatio, textureOptions = null } = graphic.attribute;
|
|
17637
17807
|
let pattern = null;
|
|
17638
17808
|
const patternKey = this.getPatternCacheKey(texture, textureSize, texturePadding, textureColor, context.dpr);
|
|
@@ -17736,6 +17906,27 @@ class DefaultBaseTextureRenderContribution {
|
|
|
17736
17906
|
originalContext.restore();
|
|
17737
17907
|
}
|
|
17738
17908
|
else if (pattern) {
|
|
17909
|
+
if (pattern.setTransform) {
|
|
17910
|
+
const alignToGraphic = !!(textureOptions === null || textureOptions === void 0 ? void 0 : textureOptions.alignToGraphic);
|
|
17911
|
+
const alignOffsetX = (_b = textureOptions === null || textureOptions === void 0 ? void 0 : textureOptions.alignOffsetX) !== null && _b !== void 0 ? _b : 0;
|
|
17912
|
+
const alignOffsetY = (_c = textureOptions === null || textureOptions === void 0 ? void 0 : textureOptions.alignOffsetY) !== null && _c !== void 0 ? _c : 0;
|
|
17913
|
+
let translateX = 0;
|
|
17914
|
+
let translateY = 0;
|
|
17915
|
+
if (alignToGraphic) {
|
|
17916
|
+
const m = context.currentMatrix;
|
|
17917
|
+
const e = (_d = m === null || m === void 0 ? void 0 : m.e) !== null && _d !== void 0 ? _d : 0;
|
|
17918
|
+
const f = (_e = m === null || m === void 0 ? void 0 : m.f) !== null && _e !== void 0 ? _e : 0;
|
|
17919
|
+
const ux = e + x + alignOffsetX;
|
|
17920
|
+
const uy = f + y + alignOffsetY;
|
|
17921
|
+
translateX = ux;
|
|
17922
|
+
translateY = uy;
|
|
17923
|
+
}
|
|
17924
|
+
else if (alignOffsetX || alignOffsetY) {
|
|
17925
|
+
translateX = alignOffsetX;
|
|
17926
|
+
translateY = alignOffsetY;
|
|
17927
|
+
}
|
|
17928
|
+
pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, translateX, translateY]));
|
|
17929
|
+
}
|
|
17739
17930
|
context.highPerformanceSave();
|
|
17740
17931
|
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
|
|
17741
17932
|
context.fillStyle = pattern;
|
|
@@ -17874,31 +18065,35 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
|
|
|
17874
18065
|
this.time = BaseRenderContributionTime.beforeFillStroke;
|
|
17875
18066
|
}
|
|
17876
18067
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
17877
|
-
const { background, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY } = graphic.attribute;
|
|
18068
|
+
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;
|
|
17878
18069
|
if (!background) {
|
|
17879
18070
|
return;
|
|
17880
18071
|
}
|
|
17881
18072
|
if (graphic.backgroundImg && graphic.resources) {
|
|
17882
|
-
const res = graphic.resources.get(background);
|
|
17883
|
-
if (res.state !== 'success' || !res.data) {
|
|
18073
|
+
const res = graphic.resources.get(getBackgroundImage(background));
|
|
18074
|
+
if (!res || res.state !== 'success' || !res.data) {
|
|
17884
18075
|
return;
|
|
17885
18076
|
}
|
|
17886
18077
|
context.highPerformanceSave();
|
|
17887
18078
|
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
|
|
17888
18079
|
const b = graphic.AABBBounds;
|
|
18080
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
18081
|
+
backgroundClip && context.clip();
|
|
17889
18082
|
this.doDrawImage(context, res.data, b, {
|
|
17890
18083
|
backgroundMode,
|
|
17891
18084
|
backgroundFit,
|
|
17892
18085
|
backgroundKeepAspectRatio,
|
|
17893
18086
|
backgroundScale,
|
|
17894
18087
|
backgroundOffsetX,
|
|
17895
|
-
backgroundOffsetY
|
|
18088
|
+
backgroundOffsetY,
|
|
18089
|
+
backgroundPosition
|
|
17896
18090
|
});
|
|
17897
18091
|
context.highPerformanceRestore();
|
|
17898
18092
|
context.setTransformForCurrent();
|
|
17899
18093
|
}
|
|
17900
18094
|
else {
|
|
17901
18095
|
context.highPerformanceSave();
|
|
18096
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
17902
18097
|
context.fillStyle = background;
|
|
17903
18098
|
context.fill();
|
|
17904
18099
|
context.highPerformanceRestore();
|
|
@@ -20044,7 +20239,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20044
20239
|
}
|
|
20045
20240
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
20046
20241
|
var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
20047
|
-
const { backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio } = graphic.attribute;
|
|
20242
|
+
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;
|
|
20048
20243
|
let { background } = graphic.attribute;
|
|
20049
20244
|
if (!background) {
|
|
20050
20245
|
return;
|
|
@@ -20067,20 +20262,20 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20067
20262
|
};
|
|
20068
20263
|
save();
|
|
20069
20264
|
let b;
|
|
20070
|
-
const
|
|
20265
|
+
const backgroundConfig = isObject(background) && background.background ? background : null;
|
|
20071
20266
|
const onlyTranslate = graphic.transMatrix.onlyTranslate();
|
|
20072
|
-
if (
|
|
20267
|
+
if (backgroundConfig) {
|
|
20073
20268
|
const _b = graphic.AABBBounds;
|
|
20074
|
-
const x = ((_a =
|
|
20075
|
-
const y = ((_d =
|
|
20076
|
-
const w = (_f =
|
|
20077
|
-
const h = (_g =
|
|
20269
|
+
const x = ((_a = backgroundConfig.x) !== null && _a !== void 0 ? _a : _b.x1) + ((_c = backgroundConfig.dx) !== null && _c !== void 0 ? _c : 0);
|
|
20270
|
+
const y = ((_d = backgroundConfig.y) !== null && _d !== void 0 ? _d : _b.y1) + ((_e = backgroundConfig.dy) !== null && _e !== void 0 ? _e : 0);
|
|
20271
|
+
const w = (_f = backgroundConfig.width) !== null && _f !== void 0 ? _f : _b.width();
|
|
20272
|
+
const h = (_g = backgroundConfig.height) !== null && _g !== void 0 ? _g : _b.height();
|
|
20078
20273
|
b = boundsAllocate.allocate(x, y, x + w, y + h);
|
|
20079
|
-
background =
|
|
20274
|
+
background = backgroundConfig.background;
|
|
20080
20275
|
if (!onlyTranslate) {
|
|
20081
20276
|
const w = b.width();
|
|
20082
20277
|
const h = b.height();
|
|
20083
|
-
b.set(((_h =
|
|
20278
|
+
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);
|
|
20084
20279
|
}
|
|
20085
20280
|
}
|
|
20086
20281
|
else {
|
|
@@ -20091,7 +20286,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20091
20286
|
}
|
|
20092
20287
|
if (graphic.backgroundImg && graphic.resources) {
|
|
20093
20288
|
const res = graphic.resources.get(background);
|
|
20094
|
-
if (res.state !== 'success' || !res.data) {
|
|
20289
|
+
if (!res || res.state !== 'success' || !res.data) {
|
|
20095
20290
|
restore();
|
|
20096
20291
|
return;
|
|
20097
20292
|
}
|
|
@@ -20100,16 +20295,33 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20100
20295
|
else {
|
|
20101
20296
|
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
|
|
20102
20297
|
}
|
|
20103
|
-
context.
|
|
20104
|
-
|
|
20298
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
20299
|
+
if (backgroundClip) {
|
|
20300
|
+
context.beginPath();
|
|
20301
|
+
if (backgroundCornerRadius) {
|
|
20302
|
+
createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, true);
|
|
20303
|
+
}
|
|
20304
|
+
else {
|
|
20305
|
+
context.rect(b.x1, b.y1, b.width(), b.height());
|
|
20306
|
+
}
|
|
20307
|
+
context.clip();
|
|
20308
|
+
}
|
|
20309
|
+
this.doDrawImage(context, res.data, b, {
|
|
20310
|
+
backgroundMode,
|
|
20311
|
+
backgroundFit,
|
|
20312
|
+
backgroundKeepAspectRatio,
|
|
20313
|
+
backgroundScale,
|
|
20314
|
+
backgroundOffsetX,
|
|
20315
|
+
backgroundOffsetY,
|
|
20316
|
+
backgroundPosition
|
|
20317
|
+
});
|
|
20105
20318
|
context.highPerformanceRestore();
|
|
20106
20319
|
context.setTransformForCurrent();
|
|
20107
20320
|
}
|
|
20108
20321
|
else {
|
|
20109
|
-
const { backgroundCornerRadius, backgroundOpacity = 1 } = graphic.attribute;
|
|
20110
20322
|
context.highPerformanceSave();
|
|
20111
20323
|
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
|
|
20112
|
-
context.globalAlpha = backgroundOpacity;
|
|
20324
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
20113
20325
|
context.fillStyle = background;
|
|
20114
20326
|
if (backgroundCornerRadius) {
|
|
20115
20327
|
createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, true);
|
|
@@ -20120,7 +20332,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20120
20332
|
}
|
|
20121
20333
|
context.highPerformanceRestore();
|
|
20122
20334
|
}
|
|
20123
|
-
if (
|
|
20335
|
+
if (backgroundConfig) {
|
|
20124
20336
|
boundsAllocate.free(b);
|
|
20125
20337
|
}
|
|
20126
20338
|
restore();
|
|
@@ -20705,6 +20917,75 @@ DefaultCanvasGroupRender = __decorate([
|
|
|
20705
20917
|
], DefaultCanvasGroupRender);
|
|
20706
20918
|
|
|
20707
20919
|
const repeatStr = ['', 'repeat-x', 'repeat-y', 'repeat'];
|
|
20920
|
+
function resolveImageMode({ repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode }) {
|
|
20921
|
+
const repeatMode = resolveImageRepeatMode(repeatX, repeatY);
|
|
20922
|
+
return {
|
|
20923
|
+
repeatMode,
|
|
20924
|
+
sizingMode: repeatMode === 'no-repeat' ? imageMode !== null && imageMode !== void 0 ? imageMode : 'fill' : 'fill'
|
|
20925
|
+
};
|
|
20926
|
+
}
|
|
20927
|
+
const IMAGE_MODE_TO_BACKGROUND_MODE = {
|
|
20928
|
+
cover: 'no-repeat-cover',
|
|
20929
|
+
contain: 'no-repeat-contain',
|
|
20930
|
+
fill: 'no-repeat-fill',
|
|
20931
|
+
auto: 'no-repeat-auto'
|
|
20932
|
+
};
|
|
20933
|
+
function resolveBackgroundParamsByImageSizing(sizingMode) {
|
|
20934
|
+
return {
|
|
20935
|
+
backgroundMode: IMAGE_MODE_TO_BACKGROUND_MODE[sizingMode],
|
|
20936
|
+
backgroundFit: false,
|
|
20937
|
+
backgroundKeepAspectRatio: false
|
|
20938
|
+
};
|
|
20939
|
+
}
|
|
20940
|
+
function resolveImageRepeatMode(repeatX, repeatY) {
|
|
20941
|
+
let repeat = 0;
|
|
20942
|
+
if (repeatX === 'repeat') {
|
|
20943
|
+
repeat |= 0b0001;
|
|
20944
|
+
}
|
|
20945
|
+
if (repeatY === 'repeat') {
|
|
20946
|
+
repeat |= 0b0010;
|
|
20947
|
+
}
|
|
20948
|
+
return repeat ? repeatStr[repeat] : 'no-repeat';
|
|
20949
|
+
}
|
|
20950
|
+
function shouldClipImageByLayout({ repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode, imageScale = 1, imageOffsetX = 0, imageOffsetY = 0, imagePosition = 'top-left' }) {
|
|
20951
|
+
const { repeatMode, sizingMode } = resolveImageMode({
|
|
20952
|
+
repeatX,
|
|
20953
|
+
repeatY,
|
|
20954
|
+
imageMode
|
|
20955
|
+
});
|
|
20956
|
+
return (repeatMode === 'no-repeat' &&
|
|
20957
|
+
(sizingMode === 'cover' || sizingMode === 'auto' || imageScale !== 1 || imageOffsetX !== 0 || imageOffsetY !== 0));
|
|
20958
|
+
}
|
|
20959
|
+
function drawImageWithLayout(context, data, x, y, width, height, { repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode, imageScale = 1, imageOffsetX = 0, imageOffsetY = 0, imagePosition = 'top-left' }) {
|
|
20960
|
+
const { repeatMode, sizingMode } = resolveImageMode({
|
|
20961
|
+
repeatX,
|
|
20962
|
+
repeatY,
|
|
20963
|
+
imageMode
|
|
20964
|
+
});
|
|
20965
|
+
const imageBackgroundParams = repeatMode === 'no-repeat'
|
|
20966
|
+
? resolveBackgroundParamsByImageSizing(sizingMode)
|
|
20967
|
+
: {
|
|
20968
|
+
backgroundMode: repeatMode,
|
|
20969
|
+
backgroundFit: false,
|
|
20970
|
+
backgroundKeepAspectRatio: false
|
|
20971
|
+
};
|
|
20972
|
+
drawBackgroundImage(context, data, {
|
|
20973
|
+
x1: x,
|
|
20974
|
+
y1: y,
|
|
20975
|
+
x2: x + width,
|
|
20976
|
+
y2: y + height,
|
|
20977
|
+
width: () => width,
|
|
20978
|
+
height: () => height
|
|
20979
|
+
}, {
|
|
20980
|
+
backgroundMode: imageBackgroundParams.backgroundMode,
|
|
20981
|
+
backgroundFit: imageBackgroundParams.backgroundFit,
|
|
20982
|
+
backgroundKeepAspectRatio: imageBackgroundParams.backgroundKeepAspectRatio,
|
|
20983
|
+
backgroundScale: imageScale,
|
|
20984
|
+
backgroundOffsetX: imageOffsetX,
|
|
20985
|
+
backgroundOffsetY: imageOffsetY,
|
|
20986
|
+
backgroundPosition: imagePosition
|
|
20987
|
+
});
|
|
20988
|
+
}
|
|
20708
20989
|
let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
|
|
20709
20990
|
constructor(graphicRenderContributions) {
|
|
20710
20991
|
super();
|
|
@@ -20715,7 +20996,7 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20715
20996
|
}
|
|
20716
20997
|
drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
20717
20998
|
const imageAttribute = getTheme(image).image;
|
|
20718
|
-
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;
|
|
20999
|
+
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;
|
|
20719
21000
|
const data = this.valid(image, imageAttribute, fillCb);
|
|
20720
21001
|
if (!data) {
|
|
20721
21002
|
return;
|
|
@@ -20731,13 +21012,13 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20731
21012
|
const width = image.width;
|
|
20732
21013
|
const height = image.height;
|
|
20733
21014
|
context.beginPath();
|
|
20734
|
-
let
|
|
21015
|
+
let needCornerClip = false;
|
|
20735
21016
|
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
20736
21017
|
context.rect(x, y, width, height);
|
|
20737
21018
|
}
|
|
20738
21019
|
else {
|
|
20739
21020
|
createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');
|
|
20740
|
-
|
|
21021
|
+
needCornerClip = true;
|
|
20741
21022
|
}
|
|
20742
21023
|
context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
|
|
20743
21024
|
const _runFill = () => {
|
|
@@ -20747,23 +21028,15 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20747
21028
|
}
|
|
20748
21029
|
else if (fVisible) {
|
|
20749
21030
|
context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
context.fillStyle = pattern;
|
|
20760
|
-
context.translate(x, y, true);
|
|
20761
|
-
context.fillRect(0, 0, width, height);
|
|
20762
|
-
context.translate(-x, -y, true);
|
|
20763
|
-
}
|
|
20764
|
-
else {
|
|
20765
|
-
context.drawImage(res.data, x, y, width, height);
|
|
20766
|
-
}
|
|
21031
|
+
drawImageWithLayout(context, res.data, x, y, width, height, {
|
|
21032
|
+
repeatX,
|
|
21033
|
+
repeatY,
|
|
21034
|
+
imageMode,
|
|
21035
|
+
imageScale,
|
|
21036
|
+
imageOffsetX,
|
|
21037
|
+
imageOffsetY,
|
|
21038
|
+
imagePosition
|
|
21039
|
+
});
|
|
20767
21040
|
}
|
|
20768
21041
|
}
|
|
20769
21042
|
};
|
|
@@ -20778,27 +21051,37 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20778
21051
|
}
|
|
20779
21052
|
}
|
|
20780
21053
|
};
|
|
21054
|
+
const needLayoutClip = shouldClipImageByLayout({
|
|
21055
|
+
repeatX,
|
|
21056
|
+
repeatY,
|
|
21057
|
+
imageMode,
|
|
21058
|
+
imageScale,
|
|
21059
|
+
imageOffsetX,
|
|
21060
|
+
imageOffsetY,
|
|
21061
|
+
imagePosition
|
|
21062
|
+
});
|
|
21063
|
+
const needClip = needCornerClip || needLayoutClip;
|
|
20781
21064
|
if (!fillStrokeOrder) {
|
|
20782
|
-
if (
|
|
21065
|
+
if (needClip) {
|
|
20783
21066
|
context.save();
|
|
20784
21067
|
context.clip();
|
|
20785
21068
|
}
|
|
20786
21069
|
this.beforeRenderStep(image, context, x, y, doFill, false, fVisible, false, imageAttribute, drawContext, fillCb);
|
|
20787
21070
|
_runFill();
|
|
20788
|
-
if (
|
|
21071
|
+
if (needClip) {
|
|
20789
21072
|
context.restore();
|
|
20790
21073
|
}
|
|
20791
21074
|
_runStroke();
|
|
20792
21075
|
}
|
|
20793
21076
|
else {
|
|
20794
21077
|
_runStroke();
|
|
20795
|
-
if (
|
|
21078
|
+
if (needClip) {
|
|
20796
21079
|
context.save();
|
|
20797
21080
|
context.clip();
|
|
20798
21081
|
}
|
|
20799
21082
|
this.beforeRenderStep(image, context, x, y, doFill, false, fVisible, false, imageAttribute, drawContext, fillCb);
|
|
20800
21083
|
_runFill();
|
|
20801
|
-
if (
|
|
21084
|
+
if (needClip) {
|
|
20802
21085
|
context.restore();
|
|
20803
21086
|
}
|
|
20804
21087
|
}
|
|
@@ -22052,7 +22335,7 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
22052
22335
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
22053
22336
|
}
|
|
22054
22337
|
clearScreen(renderService, context, drawContext) {
|
|
22055
|
-
var _a, _b, _c;
|
|
22338
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
22056
22339
|
const { clear, viewBox } = drawContext;
|
|
22057
22340
|
const x = 0;
|
|
22058
22341
|
const y = 0;
|
|
@@ -22064,11 +22347,24 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
22064
22347
|
renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
|
|
22065
22348
|
}
|
|
22066
22349
|
const stage = (_b = renderService.drawParams) === null || _b === void 0 ? void 0 : _b.stage;
|
|
22067
|
-
|
|
22350
|
+
if (stage) {
|
|
22351
|
+
context.globalAlpha =
|
|
22352
|
+
((_c = stage.attribute.opacity) !== null && _c !== void 0 ? _c : 1) * ((_d = stage.attribute.backgroundOpacity) !== null && _d !== void 0 ? _d : 1);
|
|
22353
|
+
}
|
|
22068
22354
|
if (stage && stage.backgroundImg && stage.resources) {
|
|
22069
|
-
const res = stage.resources.get(clear);
|
|
22355
|
+
const res = stage.resources.get(getBackgroundImage(clear));
|
|
22070
22356
|
if (res && res.state === 'success' && res.data) {
|
|
22071
|
-
|
|
22357
|
+
const backgroundBounds = boundsAllocate.allocate(x, y, x + width, y + height);
|
|
22358
|
+
drawBackgroundImage(context, res.data, backgroundBounds, {
|
|
22359
|
+
backgroundMode: (_e = stage.attribute.backgroundMode) !== null && _e !== void 0 ? _e : DefaultAttribute.backgroundMode,
|
|
22360
|
+
backgroundFit: (_f = stage.attribute.backgroundFit) !== null && _f !== void 0 ? _f : DefaultAttribute.backgroundFit,
|
|
22361
|
+
backgroundKeepAspectRatio: (_g = stage.attribute.backgroundKeepAspectRatio) !== null && _g !== void 0 ? _g : DefaultAttribute.backgroundKeepAspectRatio,
|
|
22362
|
+
backgroundScale: (_h = stage.attribute.backgroundScale) !== null && _h !== void 0 ? _h : DefaultAttribute.backgroundScale,
|
|
22363
|
+
backgroundOffsetX: (_j = stage.attribute.backgroundOffsetX) !== null && _j !== void 0 ? _j : DefaultAttribute.backgroundOffsetX,
|
|
22364
|
+
backgroundOffsetY: (_k = stage.attribute.backgroundOffsetY) !== null && _k !== void 0 ? _k : DefaultAttribute.backgroundOffsetY,
|
|
22365
|
+
backgroundPosition: (_l = stage.attribute.backgroundPosition) !== null && _l !== void 0 ? _l : DefaultAttribute.backgroundPosition
|
|
22366
|
+
});
|
|
22367
|
+
boundsAllocate.free(backgroundBounds);
|
|
22072
22368
|
}
|
|
22073
22369
|
}
|
|
22074
22370
|
else {
|
|
@@ -22834,6 +23130,7 @@ class Stage extends Group {
|
|
|
22834
23130
|
}
|
|
22835
23131
|
set background(b) {
|
|
22836
23132
|
this._background = b;
|
|
23133
|
+
this.syncBackgroundImage(b);
|
|
22837
23134
|
}
|
|
22838
23135
|
get defaultLayer() {
|
|
22839
23136
|
return this.at(0);
|
|
@@ -22853,6 +23150,30 @@ class Stage extends Group {
|
|
|
22853
23150
|
this._ticker = ticker;
|
|
22854
23151
|
this._ticker.on('tick', this.afterTickCb);
|
|
22855
23152
|
}
|
|
23153
|
+
syncBackgroundImage(background) {
|
|
23154
|
+
var _a;
|
|
23155
|
+
const source = (_a = background === null || background === void 0 ? void 0 : background.background) !== null && _a !== void 0 ? _a : background;
|
|
23156
|
+
this.backgroundImg = false;
|
|
23157
|
+
if (this.isImageBackgroundSource(source)) {
|
|
23158
|
+
this.loadImage(source, true);
|
|
23159
|
+
}
|
|
23160
|
+
}
|
|
23161
|
+
isImageBackgroundSource(source) {
|
|
23162
|
+
if (!source) {
|
|
23163
|
+
return false;
|
|
23164
|
+
}
|
|
23165
|
+
if (typeof source === 'string') {
|
|
23166
|
+
return source.startsWith('<svg') || isValidUrl(source) || source.includes('/') || isBase64(source);
|
|
23167
|
+
}
|
|
23168
|
+
if (!isObject(source)) {
|
|
23169
|
+
return false;
|
|
23170
|
+
}
|
|
23171
|
+
const gradientSource = source;
|
|
23172
|
+
if (typeof gradientSource.gradient === 'string' && Array.isArray(gradientSource.stops)) {
|
|
23173
|
+
return false;
|
|
23174
|
+
}
|
|
23175
|
+
return true;
|
|
23176
|
+
}
|
|
22856
23177
|
constructor(params = {}) {
|
|
22857
23178
|
var _a, _b;
|
|
22858
23179
|
super({});
|
|
@@ -22969,8 +23290,8 @@ class Stage extends Group {
|
|
|
22969
23290
|
};
|
|
22970
23291
|
}
|
|
22971
23292
|
this.optmize(params.optimize);
|
|
22972
|
-
if (params.background
|
|
22973
|
-
this.
|
|
23293
|
+
if (params.background) {
|
|
23294
|
+
this.syncBackgroundImage(this._background);
|
|
22974
23295
|
}
|
|
22975
23296
|
this.initAnimate(params);
|
|
22976
23297
|
this.rafId = (_b = params.rafId) !== null && _b !== void 0 ? _b : Math.floor(Math.random() * 6);
|
|
@@ -28149,4 +28470,4 @@ const registerFlexLayoutPlugin = () => {
|
|
|
28149
28470
|
Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
|
|
28150
28471
|
};
|
|
28151
28472
|
|
|
28152
|
-
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 };
|
|
28473
|
+
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 };
|