@visactor/vrender-core 1.0.46-alpha.0 → 1.0.46-alpha.2
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/core/layer.d.ts +1 -1
- package/cjs/core/layer.js.map +1 -1
- package/cjs/core/stage.d.ts +5 -3
- package/cjs/core/stage.js +16 -4
- package/cjs/core/stage.js.map +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.d.ts +2 -2
- package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js +47 -9
- 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 +484 -121
- package/es/canvas/constants.js +2 -1
- package/es/color-string/index.js +1 -2
- package/es/core/layer.d.ts +1 -1
- package/es/core/layer.js.map +1 -1
- package/es/core/stage.d.ts +5 -3
- package/es/core/stage.js +16 -5
- package/es/core/stage.js.map +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.d.ts +2 -2
- package/es/render/contributions/render/contributions/base-texture-contribution-render.js +47 -9
- 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);
|
|
17468
|
+
}
|
|
17469
|
+
if (horizontal == null && genericTokens.length) {
|
|
17470
|
+
horizontal = genericTokens.shift();
|
|
17471
|
+
}
|
|
17472
|
+
if (vertical == null && genericTokens.length) {
|
|
17473
|
+
vertical = genericTokens.shift();
|
|
17400
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,10 +17802,11 @@ 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, _f;
|
|
17636
17806
|
const { textureRatio = graphicAttribute.textureRatio, textureOptions = null } = graphic.attribute;
|
|
17637
17807
|
let pattern = null;
|
|
17638
|
-
const
|
|
17808
|
+
const textureRadius = (_a = textureOptions === null || textureOptions === void 0 ? void 0 : textureOptions.radius) !== null && _a !== void 0 ? _a : 0;
|
|
17809
|
+
const patternKey = this.getPatternCacheKey(texture, textureSize, texturePadding, textureColor, context.dpr, textureRadius);
|
|
17639
17810
|
if (patternKey !== null) {
|
|
17640
17811
|
pattern = this.textureMap.get(patternKey);
|
|
17641
17812
|
}
|
|
@@ -17669,7 +17840,7 @@ class DefaultBaseTextureRenderContribution {
|
|
|
17669
17840
|
}
|
|
17670
17841
|
}
|
|
17671
17842
|
if (!pattern) {
|
|
17672
|
-
pattern = this.createResourcePattern(texture, graphic, context);
|
|
17843
|
+
pattern = this.createResourcePattern(texture, graphic, context, texturePadding, textureRadius);
|
|
17673
17844
|
}
|
|
17674
17845
|
if (pattern && patternKey !== null) {
|
|
17675
17846
|
this.textureMap.set(patternKey, pattern);
|
|
@@ -17720,7 +17891,7 @@ class DefaultBaseTextureRenderContribution {
|
|
|
17720
17891
|
for (let j = 0; j < gridColumns; j++) {
|
|
17721
17892
|
const _x = x + cellSize / 2 + j * cellSize;
|
|
17722
17893
|
const _y = y + cellSize / 2 + i * cellSize;
|
|
17723
|
-
(
|
|
17894
|
+
(_b = textureOptions.beforeDynamicTexture) === null || _b === void 0 ? void 0 : _b.call(textureOptions, context, i, j, gridRows, gridColumns, textureRatio, graphic, b.width(), b.height());
|
|
17724
17895
|
context.beginPath();
|
|
17725
17896
|
if (parsedPath.draw(context, Math.min(sizeW - gutterColumn, sizeH - gutterRow), _x, _y, 0) === false) {
|
|
17726
17897
|
context.closePath();
|
|
@@ -17736,6 +17907,27 @@ class DefaultBaseTextureRenderContribution {
|
|
|
17736
17907
|
originalContext.restore();
|
|
17737
17908
|
}
|
|
17738
17909
|
else if (pattern) {
|
|
17910
|
+
if (pattern.setTransform) {
|
|
17911
|
+
const alignToGraphic = !!(textureOptions === null || textureOptions === void 0 ? void 0 : textureOptions.alignToGraphic);
|
|
17912
|
+
const alignOffsetX = (_c = textureOptions === null || textureOptions === void 0 ? void 0 : textureOptions.alignOffsetX) !== null && _c !== void 0 ? _c : 0;
|
|
17913
|
+
const alignOffsetY = (_d = textureOptions === null || textureOptions === void 0 ? void 0 : textureOptions.alignOffsetY) !== null && _d !== void 0 ? _d : 0;
|
|
17914
|
+
let translateX = 0;
|
|
17915
|
+
let translateY = 0;
|
|
17916
|
+
if (alignToGraphic) {
|
|
17917
|
+
const m = context.currentMatrix;
|
|
17918
|
+
const e = (_e = m === null || m === void 0 ? void 0 : m.e) !== null && _e !== void 0 ? _e : 0;
|
|
17919
|
+
const f = (_f = m === null || m === void 0 ? void 0 : m.f) !== null && _f !== void 0 ? _f : 0;
|
|
17920
|
+
const ux = e + x + alignOffsetX;
|
|
17921
|
+
const uy = f + y + alignOffsetY;
|
|
17922
|
+
translateX = ux;
|
|
17923
|
+
translateY = uy;
|
|
17924
|
+
}
|
|
17925
|
+
else if (alignOffsetX || alignOffsetY) {
|
|
17926
|
+
translateX = alignOffsetX;
|
|
17927
|
+
translateY = alignOffsetY;
|
|
17928
|
+
}
|
|
17929
|
+
pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, translateX, translateY]));
|
|
17930
|
+
}
|
|
17739
17931
|
context.highPerformanceSave();
|
|
17740
17932
|
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
|
|
17741
17933
|
context.fillStyle = pattern;
|
|
@@ -17751,22 +17943,63 @@ class DefaultBaseTextureRenderContribution {
|
|
|
17751
17943
|
context.restore();
|
|
17752
17944
|
}
|
|
17753
17945
|
}
|
|
17754
|
-
getPatternCacheKey(texture, textureSize, texturePadding, textureColor, dpr) {
|
|
17946
|
+
getPatternCacheKey(texture, textureSize, texturePadding, textureColor, dpr, textureRadius) {
|
|
17755
17947
|
if (typeof texture !== 'string') {
|
|
17756
|
-
return texture;
|
|
17948
|
+
return texturePadding > 0 || textureRadius > 0 ? null : texture;
|
|
17757
17949
|
}
|
|
17758
17950
|
if (texture === 'wave') {
|
|
17759
17951
|
return null;
|
|
17760
17952
|
}
|
|
17761
17953
|
return `${texture}-${textureSize}-${texturePadding}-${textureColor}-${dpr}`;
|
|
17762
17954
|
}
|
|
17763
|
-
createResourcePattern(texture, graphic, context) {
|
|
17955
|
+
createResourcePattern(texture, graphic, context, texturePadding, textureRadius) {
|
|
17764
17956
|
var _a;
|
|
17765
17957
|
const resource = (_a = graphic.resources) === null || _a === void 0 ? void 0 : _a.get(texture);
|
|
17766
17958
|
const data = (resource === null || resource === void 0 ? void 0 : resource.state) === 'success' ? resource.data : typeof texture === 'object' ? texture : null;
|
|
17767
17959
|
if (!data) {
|
|
17768
17960
|
return null;
|
|
17769
17961
|
}
|
|
17962
|
+
if (texturePadding > 0 || textureRadius > 0) {
|
|
17963
|
+
const w = data.naturalWidth || data.width;
|
|
17964
|
+
const h = data.naturalHeight || data.height;
|
|
17965
|
+
if (w > 0 && h > 0) {
|
|
17966
|
+
const tileW = w + texturePadding * 2;
|
|
17967
|
+
const tileH = h + texturePadding * 2;
|
|
17968
|
+
const canvas = canvasAllocate.allocate({ width: tileW, height: tileH, dpr: context.dpr });
|
|
17969
|
+
const ctx = canvas.getContext('2d');
|
|
17970
|
+
if (ctx) {
|
|
17971
|
+
ctx.inuse = true;
|
|
17972
|
+
ctx.clearMatrix();
|
|
17973
|
+
ctx.setTransformForCurrent(true);
|
|
17974
|
+
ctx.clearRect(0, 0, tileW, tileH);
|
|
17975
|
+
if (textureRadius > 0) {
|
|
17976
|
+
const r = Math.max(0, Math.min(textureRadius, Math.min(w, h) / 2));
|
|
17977
|
+
const x0 = texturePadding;
|
|
17978
|
+
const y0 = texturePadding;
|
|
17979
|
+
const x1 = x0 + w;
|
|
17980
|
+
const y1 = y0 + h;
|
|
17981
|
+
ctx.beginPath();
|
|
17982
|
+
ctx.moveTo(x0 + r, y0);
|
|
17983
|
+
ctx.lineTo(x1 - r, y0);
|
|
17984
|
+
ctx.quadraticCurveTo(x1, y0, x1, y0 + r);
|
|
17985
|
+
ctx.lineTo(x1, y1 - r);
|
|
17986
|
+
ctx.quadraticCurveTo(x1, y1, x1 - r, y1);
|
|
17987
|
+
ctx.lineTo(x0 + r, y1);
|
|
17988
|
+
ctx.quadraticCurveTo(x0, y1, x0, y1 - r);
|
|
17989
|
+
ctx.lineTo(x0, y0 + r);
|
|
17990
|
+
ctx.quadraticCurveTo(x0, y0, x0 + r, y0);
|
|
17991
|
+
ctx.closePath();
|
|
17992
|
+
ctx.clip();
|
|
17993
|
+
}
|
|
17994
|
+
ctx.drawImage(data, texturePadding, texturePadding, w, h);
|
|
17995
|
+
const pattern = context.createPattern(canvas.nativeCanvas, 'repeat');
|
|
17996
|
+
(pattern === null || pattern === void 0 ? void 0 : pattern.setTransform) && pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, 0, 0]));
|
|
17997
|
+
canvasAllocate.free(canvas);
|
|
17998
|
+
return pattern;
|
|
17999
|
+
}
|
|
18000
|
+
canvasAllocate.free(canvas);
|
|
18001
|
+
}
|
|
18002
|
+
}
|
|
17770
18003
|
const pattern = context.createPattern(data, 'repeat');
|
|
17771
18004
|
(pattern === null || pattern === void 0 ? void 0 : pattern.setTransform) && pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, 0, 0]));
|
|
17772
18005
|
return pattern;
|
|
@@ -17874,31 +18107,35 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
|
|
|
17874
18107
|
this.time = BaseRenderContributionTime.beforeFillStroke;
|
|
17875
18108
|
}
|
|
17876
18109
|
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;
|
|
18110
|
+
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
18111
|
if (!background) {
|
|
17879
18112
|
return;
|
|
17880
18113
|
}
|
|
17881
18114
|
if (graphic.backgroundImg && graphic.resources) {
|
|
17882
|
-
const res = graphic.resources.get(background);
|
|
17883
|
-
if (res.state !== 'success' || !res.data) {
|
|
18115
|
+
const res = graphic.resources.get(getBackgroundImage(background));
|
|
18116
|
+
if (!res || res.state !== 'success' || !res.data) {
|
|
17884
18117
|
return;
|
|
17885
18118
|
}
|
|
17886
18119
|
context.highPerformanceSave();
|
|
17887
18120
|
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
|
|
17888
18121
|
const b = graphic.AABBBounds;
|
|
18122
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
18123
|
+
backgroundClip && context.clip();
|
|
17889
18124
|
this.doDrawImage(context, res.data, b, {
|
|
17890
18125
|
backgroundMode,
|
|
17891
18126
|
backgroundFit,
|
|
17892
18127
|
backgroundKeepAspectRatio,
|
|
17893
18128
|
backgroundScale,
|
|
17894
18129
|
backgroundOffsetX,
|
|
17895
|
-
backgroundOffsetY
|
|
18130
|
+
backgroundOffsetY,
|
|
18131
|
+
backgroundPosition
|
|
17896
18132
|
});
|
|
17897
18133
|
context.highPerformanceRestore();
|
|
17898
18134
|
context.setTransformForCurrent();
|
|
17899
18135
|
}
|
|
17900
18136
|
else {
|
|
17901
18137
|
context.highPerformanceSave();
|
|
18138
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
17902
18139
|
context.fillStyle = background;
|
|
17903
18140
|
context.fill();
|
|
17904
18141
|
context.highPerformanceRestore();
|
|
@@ -20044,7 +20281,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20044
20281
|
}
|
|
20045
20282
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
20046
20283
|
var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
20047
|
-
const { backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio } = graphic.attribute;
|
|
20284
|
+
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
20285
|
let { background } = graphic.attribute;
|
|
20049
20286
|
if (!background) {
|
|
20050
20287
|
return;
|
|
@@ -20067,20 +20304,20 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20067
20304
|
};
|
|
20068
20305
|
save();
|
|
20069
20306
|
let b;
|
|
20070
|
-
const
|
|
20307
|
+
const backgroundConfig = isObject(background) && background.background ? background : null;
|
|
20071
20308
|
const onlyTranslate = graphic.transMatrix.onlyTranslate();
|
|
20072
|
-
if (
|
|
20309
|
+
if (backgroundConfig) {
|
|
20073
20310
|
const _b = graphic.AABBBounds;
|
|
20074
|
-
const x = ((_a =
|
|
20075
|
-
const y = ((_d =
|
|
20076
|
-
const w = (_f =
|
|
20077
|
-
const h = (_g =
|
|
20311
|
+
const x = ((_a = backgroundConfig.x) !== null && _a !== void 0 ? _a : _b.x1) + ((_c = backgroundConfig.dx) !== null && _c !== void 0 ? _c : 0);
|
|
20312
|
+
const y = ((_d = backgroundConfig.y) !== null && _d !== void 0 ? _d : _b.y1) + ((_e = backgroundConfig.dy) !== null && _e !== void 0 ? _e : 0);
|
|
20313
|
+
const w = (_f = backgroundConfig.width) !== null && _f !== void 0 ? _f : _b.width();
|
|
20314
|
+
const h = (_g = backgroundConfig.height) !== null && _g !== void 0 ? _g : _b.height();
|
|
20078
20315
|
b = boundsAllocate.allocate(x, y, x + w, y + h);
|
|
20079
|
-
background =
|
|
20316
|
+
background = backgroundConfig.background;
|
|
20080
20317
|
if (!onlyTranslate) {
|
|
20081
20318
|
const w = b.width();
|
|
20082
20319
|
const h = b.height();
|
|
20083
|
-
b.set(((_h =
|
|
20320
|
+
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
20321
|
}
|
|
20085
20322
|
}
|
|
20086
20323
|
else {
|
|
@@ -20091,7 +20328,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20091
20328
|
}
|
|
20092
20329
|
if (graphic.backgroundImg && graphic.resources) {
|
|
20093
20330
|
const res = graphic.resources.get(background);
|
|
20094
|
-
if (res.state !== 'success' || !res.data) {
|
|
20331
|
+
if (!res || res.state !== 'success' || !res.data) {
|
|
20095
20332
|
restore();
|
|
20096
20333
|
return;
|
|
20097
20334
|
}
|
|
@@ -20100,16 +20337,33 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20100
20337
|
else {
|
|
20101
20338
|
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
|
|
20102
20339
|
}
|
|
20103
|
-
context.
|
|
20104
|
-
|
|
20340
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
20341
|
+
if (backgroundClip) {
|
|
20342
|
+
context.beginPath();
|
|
20343
|
+
if (backgroundCornerRadius) {
|
|
20344
|
+
createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, true);
|
|
20345
|
+
}
|
|
20346
|
+
else {
|
|
20347
|
+
context.rect(b.x1, b.y1, b.width(), b.height());
|
|
20348
|
+
}
|
|
20349
|
+
context.clip();
|
|
20350
|
+
}
|
|
20351
|
+
this.doDrawImage(context, res.data, b, {
|
|
20352
|
+
backgroundMode,
|
|
20353
|
+
backgroundFit,
|
|
20354
|
+
backgroundKeepAspectRatio,
|
|
20355
|
+
backgroundScale,
|
|
20356
|
+
backgroundOffsetX,
|
|
20357
|
+
backgroundOffsetY,
|
|
20358
|
+
backgroundPosition
|
|
20359
|
+
});
|
|
20105
20360
|
context.highPerformanceRestore();
|
|
20106
20361
|
context.setTransformForCurrent();
|
|
20107
20362
|
}
|
|
20108
20363
|
else {
|
|
20109
|
-
const { backgroundCornerRadius, backgroundOpacity = 1 } = graphic.attribute;
|
|
20110
20364
|
context.highPerformanceSave();
|
|
20111
20365
|
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
|
|
20112
|
-
context.globalAlpha = backgroundOpacity;
|
|
20366
|
+
context.globalAlpha = backgroundOpacity * opacity;
|
|
20113
20367
|
context.fillStyle = background;
|
|
20114
20368
|
if (backgroundCornerRadius) {
|
|
20115
20369
|
createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, true);
|
|
@@ -20120,7 +20374,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
20120
20374
|
}
|
|
20121
20375
|
context.highPerformanceRestore();
|
|
20122
20376
|
}
|
|
20123
|
-
if (
|
|
20377
|
+
if (backgroundConfig) {
|
|
20124
20378
|
boundsAllocate.free(b);
|
|
20125
20379
|
}
|
|
20126
20380
|
restore();
|
|
@@ -20705,6 +20959,75 @@ DefaultCanvasGroupRender = __decorate([
|
|
|
20705
20959
|
], DefaultCanvasGroupRender);
|
|
20706
20960
|
|
|
20707
20961
|
const repeatStr = ['', 'repeat-x', 'repeat-y', 'repeat'];
|
|
20962
|
+
function resolveImageMode({ repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode }) {
|
|
20963
|
+
const repeatMode = resolveImageRepeatMode(repeatX, repeatY);
|
|
20964
|
+
return {
|
|
20965
|
+
repeatMode,
|
|
20966
|
+
sizingMode: repeatMode === 'no-repeat' ? imageMode !== null && imageMode !== void 0 ? imageMode : 'fill' : 'fill'
|
|
20967
|
+
};
|
|
20968
|
+
}
|
|
20969
|
+
const IMAGE_MODE_TO_BACKGROUND_MODE = {
|
|
20970
|
+
cover: 'no-repeat-cover',
|
|
20971
|
+
contain: 'no-repeat-contain',
|
|
20972
|
+
fill: 'no-repeat-fill',
|
|
20973
|
+
auto: 'no-repeat-auto'
|
|
20974
|
+
};
|
|
20975
|
+
function resolveBackgroundParamsByImageSizing(sizingMode) {
|
|
20976
|
+
return {
|
|
20977
|
+
backgroundMode: IMAGE_MODE_TO_BACKGROUND_MODE[sizingMode],
|
|
20978
|
+
backgroundFit: false,
|
|
20979
|
+
backgroundKeepAspectRatio: false
|
|
20980
|
+
};
|
|
20981
|
+
}
|
|
20982
|
+
function resolveImageRepeatMode(repeatX, repeatY) {
|
|
20983
|
+
let repeat = 0;
|
|
20984
|
+
if (repeatX === 'repeat') {
|
|
20985
|
+
repeat |= 0b0001;
|
|
20986
|
+
}
|
|
20987
|
+
if (repeatY === 'repeat') {
|
|
20988
|
+
repeat |= 0b0010;
|
|
20989
|
+
}
|
|
20990
|
+
return repeat ? repeatStr[repeat] : 'no-repeat';
|
|
20991
|
+
}
|
|
20992
|
+
function shouldClipImageByLayout({ repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode, imageScale = 1, imageOffsetX = 0, imageOffsetY = 0, imagePosition = 'top-left' }) {
|
|
20993
|
+
const { repeatMode, sizingMode } = resolveImageMode({
|
|
20994
|
+
repeatX,
|
|
20995
|
+
repeatY,
|
|
20996
|
+
imageMode
|
|
20997
|
+
});
|
|
20998
|
+
return (repeatMode === 'no-repeat' &&
|
|
20999
|
+
(sizingMode === 'cover' || sizingMode === 'auto' || imageScale !== 1 || imageOffsetX !== 0 || imageOffsetY !== 0));
|
|
21000
|
+
}
|
|
21001
|
+
function drawImageWithLayout(context, data, x, y, width, height, { repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode, imageScale = 1, imageOffsetX = 0, imageOffsetY = 0, imagePosition = 'top-left' }) {
|
|
21002
|
+
const { repeatMode, sizingMode } = resolveImageMode({
|
|
21003
|
+
repeatX,
|
|
21004
|
+
repeatY,
|
|
21005
|
+
imageMode
|
|
21006
|
+
});
|
|
21007
|
+
const imageBackgroundParams = repeatMode === 'no-repeat'
|
|
21008
|
+
? resolveBackgroundParamsByImageSizing(sizingMode)
|
|
21009
|
+
: {
|
|
21010
|
+
backgroundMode: repeatMode,
|
|
21011
|
+
backgroundFit: false,
|
|
21012
|
+
backgroundKeepAspectRatio: false
|
|
21013
|
+
};
|
|
21014
|
+
drawBackgroundImage(context, data, {
|
|
21015
|
+
x1: x,
|
|
21016
|
+
y1: y,
|
|
21017
|
+
x2: x + width,
|
|
21018
|
+
y2: y + height,
|
|
21019
|
+
width: () => width,
|
|
21020
|
+
height: () => height
|
|
21021
|
+
}, {
|
|
21022
|
+
backgroundMode: imageBackgroundParams.backgroundMode,
|
|
21023
|
+
backgroundFit: imageBackgroundParams.backgroundFit,
|
|
21024
|
+
backgroundKeepAspectRatio: imageBackgroundParams.backgroundKeepAspectRatio,
|
|
21025
|
+
backgroundScale: imageScale,
|
|
21026
|
+
backgroundOffsetX: imageOffsetX,
|
|
21027
|
+
backgroundOffsetY: imageOffsetY,
|
|
21028
|
+
backgroundPosition: imagePosition
|
|
21029
|
+
});
|
|
21030
|
+
}
|
|
20708
21031
|
let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
|
|
20709
21032
|
constructor(graphicRenderContributions) {
|
|
20710
21033
|
super();
|
|
@@ -20715,7 +21038,7 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20715
21038
|
}
|
|
20716
21039
|
drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
20717
21040
|
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;
|
|
21041
|
+
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
21042
|
const data = this.valid(image, imageAttribute, fillCb);
|
|
20720
21043
|
if (!data) {
|
|
20721
21044
|
return;
|
|
@@ -20731,13 +21054,13 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20731
21054
|
const width = image.width;
|
|
20732
21055
|
const height = image.height;
|
|
20733
21056
|
context.beginPath();
|
|
20734
|
-
let
|
|
21057
|
+
let needCornerClip = false;
|
|
20735
21058
|
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
20736
21059
|
context.rect(x, y, width, height);
|
|
20737
21060
|
}
|
|
20738
21061
|
else {
|
|
20739
21062
|
createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');
|
|
20740
|
-
|
|
21063
|
+
needCornerClip = true;
|
|
20741
21064
|
}
|
|
20742
21065
|
context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
|
|
20743
21066
|
const _runFill = () => {
|
|
@@ -20747,23 +21070,15 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20747
21070
|
}
|
|
20748
21071
|
else if (fVisible) {
|
|
20749
21072
|
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
|
-
}
|
|
21073
|
+
drawImageWithLayout(context, res.data, x, y, width, height, {
|
|
21074
|
+
repeatX,
|
|
21075
|
+
repeatY,
|
|
21076
|
+
imageMode,
|
|
21077
|
+
imageScale,
|
|
21078
|
+
imageOffsetX,
|
|
21079
|
+
imageOffsetY,
|
|
21080
|
+
imagePosition
|
|
21081
|
+
});
|
|
20767
21082
|
}
|
|
20768
21083
|
}
|
|
20769
21084
|
};
|
|
@@ -20778,27 +21093,37 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
20778
21093
|
}
|
|
20779
21094
|
}
|
|
20780
21095
|
};
|
|
21096
|
+
const needLayoutClip = shouldClipImageByLayout({
|
|
21097
|
+
repeatX,
|
|
21098
|
+
repeatY,
|
|
21099
|
+
imageMode,
|
|
21100
|
+
imageScale,
|
|
21101
|
+
imageOffsetX,
|
|
21102
|
+
imageOffsetY,
|
|
21103
|
+
imagePosition
|
|
21104
|
+
});
|
|
21105
|
+
const needClip = needCornerClip || needLayoutClip;
|
|
20781
21106
|
if (!fillStrokeOrder) {
|
|
20782
|
-
if (
|
|
21107
|
+
if (needClip) {
|
|
20783
21108
|
context.save();
|
|
20784
21109
|
context.clip();
|
|
20785
21110
|
}
|
|
20786
21111
|
this.beforeRenderStep(image, context, x, y, doFill, false, fVisible, false, imageAttribute, drawContext, fillCb);
|
|
20787
21112
|
_runFill();
|
|
20788
|
-
if (
|
|
21113
|
+
if (needClip) {
|
|
20789
21114
|
context.restore();
|
|
20790
21115
|
}
|
|
20791
21116
|
_runStroke();
|
|
20792
21117
|
}
|
|
20793
21118
|
else {
|
|
20794
21119
|
_runStroke();
|
|
20795
|
-
if (
|
|
21120
|
+
if (needClip) {
|
|
20796
21121
|
context.save();
|
|
20797
21122
|
context.clip();
|
|
20798
21123
|
}
|
|
20799
21124
|
this.beforeRenderStep(image, context, x, y, doFill, false, fVisible, false, imageAttribute, drawContext, fillCb);
|
|
20800
21125
|
_runFill();
|
|
20801
|
-
if (
|
|
21126
|
+
if (needClip) {
|
|
20802
21127
|
context.restore();
|
|
20803
21128
|
}
|
|
20804
21129
|
}
|
|
@@ -22052,7 +22377,7 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
22052
22377
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
22053
22378
|
}
|
|
22054
22379
|
clearScreen(renderService, context, drawContext) {
|
|
22055
|
-
var _a, _b, _c;
|
|
22380
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
22056
22381
|
const { clear, viewBox } = drawContext;
|
|
22057
22382
|
const x = 0;
|
|
22058
22383
|
const y = 0;
|
|
@@ -22064,11 +22389,24 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
22064
22389
|
renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
|
|
22065
22390
|
}
|
|
22066
22391
|
const stage = (_b = renderService.drawParams) === null || _b === void 0 ? void 0 : _b.stage;
|
|
22067
|
-
|
|
22392
|
+
if (stage) {
|
|
22393
|
+
context.globalAlpha =
|
|
22394
|
+
((_c = stage.attribute.opacity) !== null && _c !== void 0 ? _c : 1) * ((_d = stage.attribute.backgroundOpacity) !== null && _d !== void 0 ? _d : 1);
|
|
22395
|
+
}
|
|
22068
22396
|
if (stage && stage.backgroundImg && stage.resources) {
|
|
22069
|
-
const res = stage.resources.get(clear);
|
|
22397
|
+
const res = stage.resources.get(getBackgroundImage(clear));
|
|
22070
22398
|
if (res && res.state === 'success' && res.data) {
|
|
22071
|
-
|
|
22399
|
+
const backgroundBounds = boundsAllocate.allocate(x, y, x + width, y + height);
|
|
22400
|
+
drawBackgroundImage(context, res.data, backgroundBounds, {
|
|
22401
|
+
backgroundMode: (_e = stage.attribute.backgroundMode) !== null && _e !== void 0 ? _e : DefaultAttribute.backgroundMode,
|
|
22402
|
+
backgroundFit: (_f = stage.attribute.backgroundFit) !== null && _f !== void 0 ? _f : DefaultAttribute.backgroundFit,
|
|
22403
|
+
backgroundKeepAspectRatio: (_g = stage.attribute.backgroundKeepAspectRatio) !== null && _g !== void 0 ? _g : DefaultAttribute.backgroundKeepAspectRatio,
|
|
22404
|
+
backgroundScale: (_h = stage.attribute.backgroundScale) !== null && _h !== void 0 ? _h : DefaultAttribute.backgroundScale,
|
|
22405
|
+
backgroundOffsetX: (_j = stage.attribute.backgroundOffsetX) !== null && _j !== void 0 ? _j : DefaultAttribute.backgroundOffsetX,
|
|
22406
|
+
backgroundOffsetY: (_k = stage.attribute.backgroundOffsetY) !== null && _k !== void 0 ? _k : DefaultAttribute.backgroundOffsetY,
|
|
22407
|
+
backgroundPosition: (_l = stage.attribute.backgroundPosition) !== null && _l !== void 0 ? _l : DefaultAttribute.backgroundPosition
|
|
22408
|
+
});
|
|
22409
|
+
boundsAllocate.free(backgroundBounds);
|
|
22072
22410
|
}
|
|
22073
22411
|
}
|
|
22074
22412
|
else {
|
|
@@ -22834,6 +23172,7 @@ class Stage extends Group {
|
|
|
22834
23172
|
}
|
|
22835
23173
|
set background(b) {
|
|
22836
23174
|
this._background = b;
|
|
23175
|
+
this.syncBackgroundImage(b);
|
|
22837
23176
|
}
|
|
22838
23177
|
get defaultLayer() {
|
|
22839
23178
|
return this.at(0);
|
|
@@ -22853,6 +23192,30 @@ class Stage extends Group {
|
|
|
22853
23192
|
this._ticker = ticker;
|
|
22854
23193
|
this._ticker.on('tick', this.afterTickCb);
|
|
22855
23194
|
}
|
|
23195
|
+
syncBackgroundImage(background) {
|
|
23196
|
+
var _a;
|
|
23197
|
+
const source = (_a = background === null || background === void 0 ? void 0 : background.background) !== null && _a !== void 0 ? _a : background;
|
|
23198
|
+
this.backgroundImg = false;
|
|
23199
|
+
if (this.isImageBackgroundSource(source)) {
|
|
23200
|
+
this.loadImage(source, true);
|
|
23201
|
+
}
|
|
23202
|
+
}
|
|
23203
|
+
isImageBackgroundSource(source) {
|
|
23204
|
+
if (!source) {
|
|
23205
|
+
return false;
|
|
23206
|
+
}
|
|
23207
|
+
if (typeof source === 'string') {
|
|
23208
|
+
return source.startsWith('<svg') || isValidUrl(source) || source.includes('/') || isBase64(source);
|
|
23209
|
+
}
|
|
23210
|
+
if (!isObject(source)) {
|
|
23211
|
+
return false;
|
|
23212
|
+
}
|
|
23213
|
+
const gradientSource = source;
|
|
23214
|
+
if (typeof gradientSource.gradient === 'string' && Array.isArray(gradientSource.stops)) {
|
|
23215
|
+
return false;
|
|
23216
|
+
}
|
|
23217
|
+
return true;
|
|
23218
|
+
}
|
|
22856
23219
|
constructor(params = {}) {
|
|
22857
23220
|
var _a, _b;
|
|
22858
23221
|
super({});
|
|
@@ -22969,8 +23332,8 @@ class Stage extends Group {
|
|
|
22969
23332
|
};
|
|
22970
23333
|
}
|
|
22971
23334
|
this.optmize(params.optimize);
|
|
22972
|
-
if (params.background
|
|
22973
|
-
this.
|
|
23335
|
+
if (params.background) {
|
|
23336
|
+
this.syncBackgroundImage(this._background);
|
|
22974
23337
|
}
|
|
22975
23338
|
this.initAnimate(params);
|
|
22976
23339
|
this.rafId = (_b = params.rafId) !== null && _b !== void 0 ? _b : Math.floor(Math.random() * 6);
|
|
@@ -28149,4 +28512,4 @@ const registerFlexLayoutPlugin = () => {
|
|
|
28149
28512
|
Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
|
|
28150
28513
|
};
|
|
28151
28514
|
|
|
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 };
|
|
28515
|
+
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 };
|