@visactor/vrender-core 1.0.45 → 1.0.46-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/cjs/canvas/constants.js +1 -2
  2. package/cjs/color-string/index.js +2 -1
  3. package/cjs/core/layer.d.ts +1 -1
  4. package/cjs/core/layer.js.map +1 -1
  5. package/cjs/core/stage.d.ts +3 -5
  6. package/cjs/core/stage.js +4 -16
  7. package/cjs/core/stage.js.map +1 -1
  8. package/cjs/graphic/config.js +1 -7
  9. package/cjs/graphic/config.js.map +1 -1
  10. package/cjs/graphic/graphic.js +16 -10
  11. package/cjs/graphic/graphic.js.map +1 -1
  12. package/cjs/graphic/image.d.ts +0 -1
  13. package/cjs/graphic/image.js +1 -2
  14. package/cjs/graphic/image.js.map +1 -1
  15. package/cjs/interface/graphic/image.d.ts +1 -7
  16. package/cjs/interface/graphic/image.js.map +1 -1
  17. package/cjs/interface/graphic.d.ts +5 -16
  18. package/cjs/interface/graphic.js.map +1 -1
  19. package/cjs/interface/layer.d.ts +2 -3
  20. package/cjs/interface/layer.js.map +1 -1
  21. package/cjs/interface/render.d.ts +1 -1
  22. package/cjs/interface/render.js.map +1 -1
  23. package/cjs/interface/stage.d.ts +2 -3
  24. package/cjs/interface/stage.js.map +1 -1
  25. package/cjs/render/contributions/render/contributions/base-contribution-render.d.ts +9 -27
  26. package/cjs/render/contributions/render/contributions/base-contribution-render.js +34 -147
  27. package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  28. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.d.ts +4 -2
  29. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js +41 -26
  30. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js.map +1 -1
  31. package/cjs/render/contributions/render/contributions/group-contribution-render.js +6 -8
  32. package/cjs/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
  33. package/cjs/render/contributions/render/contributions/text-contribution-render.js +17 -20
  34. package/cjs/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
  35. package/cjs/render/contributions/render/draw-contribution.js +5 -16
  36. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  37. package/cjs/render/contributions/render/image-render.d.ts +1 -14
  38. package/cjs/render/contributions/render/image-render.js +20 -99
  39. package/cjs/render/contributions/render/image-render.js.map +1 -1
  40. package/dist/index.es.js +208 -441
  41. package/es/canvas/constants.js +1 -2
  42. package/es/color-string/index.js +2 -1
  43. package/es/core/layer.d.ts +1 -1
  44. package/es/core/layer.js.map +1 -1
  45. package/es/core/stage.d.ts +3 -5
  46. package/es/core/stage.js +5 -16
  47. package/es/core/stage.js.map +1 -1
  48. package/es/graphic/config.js +1 -7
  49. package/es/graphic/config.js.map +1 -1
  50. package/es/graphic/graphic.js +14 -9
  51. package/es/graphic/graphic.js.map +1 -1
  52. package/es/graphic/image.d.ts +0 -1
  53. package/es/graphic/image.js +1 -2
  54. package/es/graphic/image.js.map +1 -1
  55. package/es/interface/graphic/image.d.ts +1 -7
  56. package/es/interface/graphic/image.js.map +1 -1
  57. package/es/interface/graphic.d.ts +5 -16
  58. package/es/interface/graphic.js.map +1 -1
  59. package/es/interface/layer.d.ts +2 -3
  60. package/es/interface/layer.js.map +1 -1
  61. package/es/interface/render.d.ts +1 -1
  62. package/es/interface/render.js.map +1 -1
  63. package/es/interface/stage.d.ts +2 -3
  64. package/es/interface/stage.js.map +1 -1
  65. package/es/render/contributions/render/contributions/base-contribution-render.d.ts +9 -27
  66. package/es/render/contributions/render/contributions/base-contribution-render.js +33 -140
  67. package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  68. package/es/render/contributions/render/contributions/base-texture-contribution-render.d.ts +4 -2
  69. package/es/render/contributions/render/contributions/base-texture-contribution-render.js +41 -26
  70. package/es/render/contributions/render/contributions/base-texture-contribution-render.js.map +1 -1
  71. package/es/render/contributions/render/contributions/group-contribution-render.js +7 -9
  72. package/es/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
  73. package/es/render/contributions/render/contributions/text-contribution-render.js +16 -20
  74. package/es/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
  75. package/es/render/contributions/render/draw-contribution.js +4 -17
  76. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  77. package/es/render/contributions/render/image-render.d.ts +1 -14
  78. package/es/render/contributions/render/image-render.js +18 -93
  79. package/es/render/contributions/render/image-render.js.map +1 -1
  80. package/package.json +3 -3
package/dist/index.es.js CHANGED
@@ -3563,7 +3563,7 @@ const DefaultTextStyle = {
3563
3563
  const DefaultPickStyle = {
3564
3564
  pickStrokeBuffer: 0
3565
3565
  };
3566
- const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({ forceBoundsWidth: undefined, forceBoundsHeight: undefined, opacity: 1, background: null, autoAnimateTexture: false, textureRatio: 1, textureOptions: null, backgroundOpacity: 1, backgroundCornerRadius: 0, texture: null, textureColor: 'black', textureSize: 10, texturePadding: 2, backgroundMode: 'no-repeat', backgroundFit: true, backgroundKeepAspectRatio: false, backgroundClip: true, backgroundScale: 1, backgroundOffsetX: 0, backgroundOffsetY: 0, backgroundPosition: 'top-left', blur: 0, filter: '', cursor: null, html: null, react: null, vue: null }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout), DefaultPickStyle);
3566
+ const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({ forceBoundsWidth: undefined, forceBoundsHeight: undefined, opacity: 1, background: null, autoAnimateTexture: false, textureRatio: 1, textureOptions: null, backgroundOpacity: 1, backgroundCornerRadius: 0, texture: null, textureColor: 'black', textureSize: 10, texturePadding: 2, backgroundMode: 'no-repeat', backgroundFit: true, backgroundKeepAspectRatio: false, backgroundClip: true, backgroundScale: 1, backgroundOffsetX: 0, backgroundOffsetY: 0, 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', 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' });
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' });
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 () {
@@ -11063,6 +11063,17 @@ const GRAPHIC_UPDATE_TAG_KEY = [
11063
11063
  const tempConstantXYKey = ['x', 'y'];
11064
11064
  const tempConstantScaleXYKey = ['scaleX', 'scaleY'];
11065
11065
  const tempConstantAngleKey = ['angle'];
11066
+ const builtinTextureTypes = new Set([
11067
+ 'circle',
11068
+ 'diamond',
11069
+ 'rect',
11070
+ 'vertical-line',
11071
+ 'horizontal-line',
11072
+ 'bias-lr',
11073
+ 'bias-rl',
11074
+ 'grid',
11075
+ 'wave'
11076
+ ]);
11066
11077
  const point = new Point();
11067
11078
  const NOWORK_ANIMATE_ATTR = {
11068
11079
  strokeSeg: 1,
@@ -11128,6 +11139,9 @@ class Graphic extends Node {
11128
11139
  if (params.background) {
11129
11140
  this.loadImage((_a = params.background.background) !== null && _a !== void 0 ? _a : params.background, true);
11130
11141
  }
11142
+ if (isExternalTexture(params.texture)) {
11143
+ this.loadImage(params.texture, false);
11144
+ }
11131
11145
  else if (params.shadowGraphic) {
11132
11146
  this.setShadowGraphic(params.shadowGraphic);
11133
11147
  }
@@ -11420,6 +11434,9 @@ class Graphic extends Node {
11420
11434
  if (params.background) {
11421
11435
  this.loadImage(params.background, true);
11422
11436
  }
11437
+ if (isExternalTexture(params.texture)) {
11438
+ this.loadImage(params.texture, false);
11439
+ }
11423
11440
  else if (params.shadowGraphic) {
11424
11441
  this.setShadowGraphic(params.shadowGraphic);
11425
11442
  }
@@ -11469,6 +11486,9 @@ class Graphic extends Node {
11469
11486
  if (key === 'background') {
11470
11487
  this.loadImage(value, true);
11471
11488
  }
11489
+ else if (key === 'texture' && isExternalTexture(value)) {
11490
+ this.loadImage(value, false);
11491
+ }
11472
11492
  else if (key === 'shadowGraphic') {
11473
11493
  this.setShadowGraphic(value);
11474
11494
  }
@@ -11499,6 +11519,9 @@ class Graphic extends Node {
11499
11519
  if (params.background) {
11500
11520
  this.loadImage(params.background, true);
11501
11521
  }
11522
+ if (isExternalTexture(params.texture)) {
11523
+ this.loadImage(params.texture, false);
11524
+ }
11502
11525
  else if (params.shadowGraphic) {
11503
11526
  this.setShadowGraphic(params.shadowGraphic);
11504
11527
  }
@@ -12056,14 +12079,7 @@ class Graphic extends Node {
12056
12079
  return this.pathProxy;
12057
12080
  }
12058
12081
  loadImage(image, background = false) {
12059
- if (background && (image === null || image === void 0 ? void 0 : image.background)) {
12060
- image = image.background;
12061
- }
12062
- if (background && (!image || backgroundNotImage(image))) {
12063
- this.backgroundImg = false;
12064
- return;
12065
- }
12066
- if (!image) {
12082
+ if (!image || (background && backgroundNotImage(image))) {
12067
12083
  return;
12068
12084
  }
12069
12085
  const url = image;
@@ -12175,17 +12191,23 @@ class Graphic extends Node {
12175
12191
  Graphic.userSymbolMap = {};
12176
12192
  Graphic.mixin(EventTarget);
12177
12193
  function backgroundNotImage(image) {
12178
- if (typeof image === 'string') {
12179
- return !(image.startsWith('<svg') || isValidUrl(image) || image.includes('/') || isBase64(image));
12180
- }
12181
12194
  if (image.fill || image.stroke) {
12182
12195
  return true;
12183
12196
  }
12184
- if (typeof image.gradient === 'string' && Array.isArray(image.stops)) {
12185
- return true;
12186
- }
12187
12197
  return false;
12188
12198
  }
12199
+ function isExternalTexture(texture) {
12200
+ if (!texture) {
12201
+ return false;
12202
+ }
12203
+ if (typeof texture === 'string') {
12204
+ if (builtinTextureTypes.has(texture)) {
12205
+ return false;
12206
+ }
12207
+ return texture.startsWith('<svg') || isValidUrl(texture) || texture.includes('/') || isBase64(texture);
12208
+ }
12209
+ return isObject(texture);
12210
+ }
12189
12211
 
12190
12212
  var GroupUpdateAABBBoundsMode;
12191
12213
  (function (GroupUpdateAABBBoundsMode) {
@@ -15309,17 +15331,7 @@ function seperateParagraph(paragraph, index) {
15309
15331
  return [p1, p2];
15310
15332
  }
15311
15333
 
15312
- const IMAGE_UPDATE_TAG_KEY = [
15313
- 'width',
15314
- 'height',
15315
- 'image',
15316
- 'imageMode',
15317
- 'imagePosition',
15318
- 'imageScale',
15319
- 'imageOffsetX',
15320
- 'imageOffsetY',
15321
- ...GRAPHIC_UPDATE_TAG_KEY
15322
- ];
15334
+ const IMAGE_UPDATE_TAG_KEY = ['width', 'height', 'image', ...GRAPHIC_UPDATE_TAG_KEY];
15323
15335
  class Image extends Graphic {
15324
15336
  constructor(params) {
15325
15337
  super(params);
@@ -15465,7 +15477,7 @@ class Image extends Graphic {
15465
15477
  return Image.NOWORK_ANIMATE_ATTR;
15466
15478
  }
15467
15479
  }
15468
- Image.NOWORK_ANIMATE_ATTR = Object.assign({ image: 1, imageMode: 1, repeatX: 1, repeatY: 1 }, NOWORK_ANIMATE_ATTR);
15480
+ Image.NOWORK_ANIMATE_ATTR = Object.assign({ image: 1, repeatX: 1, repeatY: 1 }, NOWORK_ANIMATE_ATTR);
15469
15481
  function createImage(attributes) {
15470
15482
  return new Image(attributes);
15471
15483
  }
@@ -17286,13 +17298,13 @@ class DefaultBaseBackgroundRenderContribution {
17286
17298
  }
17287
17299
  drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
17288
17300
  var _a;
17289
- const { background, backgroundOpacity = (_a = graphic.attribute.fillOpacity) !== null && _a !== void 0 ? _a : graphicAttribute.backgroundOpacity, opacity = graphicAttribute.opacity, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY, backgroundClip = graphicAttribute.backgroundClip, backgroundPosition = graphicAttribute.backgroundPosition } = graphic.attribute;
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;
17290
17302
  if (!background) {
17291
17303
  return;
17292
17304
  }
17293
17305
  if (graphic.backgroundImg && graphic.resources) {
17294
- const res = graphic.resources.get(getBackgroundImage(background));
17295
- if (!res || res.state !== 'success' || !res.data) {
17306
+ const res = graphic.resources.get(background);
17307
+ if (res.state !== 'success' || !res.data) {
17296
17308
  return;
17297
17309
  }
17298
17310
  context.save();
@@ -17312,8 +17324,7 @@ class DefaultBaseBackgroundRenderContribution {
17312
17324
  backgroundKeepAspectRatio,
17313
17325
  backgroundScale,
17314
17326
  backgroundOffsetX,
17315
- backgroundOffsetY,
17316
- backgroundPosition
17327
+ backgroundOffsetY
17317
17328
  });
17318
17329
  context.restore();
17319
17330
  if (!graphic.transMatrix.onlyTranslate()) {
@@ -17330,211 +17341,65 @@ class DefaultBaseBackgroundRenderContribution {
17330
17341
  }
17331
17342
  }
17332
17343
  doDrawImage(context, data, b, params) {
17333
- drawBackgroundImage(context, data, b, params);
17334
- }
17335
- }
17336
- const defaultBaseBackgroundRenderContribution = new DefaultBaseBackgroundRenderContribution();
17337
- const verticalPositionKeywords = new Set(['top', 'center', 'bottom']);
17338
- function getBackgroundImage(background) {
17339
- var _a;
17340
- return (_a = background === null || background === void 0 ? void 0 : background.background) !== null && _a !== void 0 ? _a : background;
17341
- }
17342
- function resolveBackgroundSizing({ backgroundFit, backgroundKeepAspectRatio }) {
17343
- if (backgroundFit) {
17344
- return backgroundKeepAspectRatio ? 'cover' : 'fill';
17345
- }
17346
- return 'auto';
17347
- }
17348
- function isNoRepeatSizingMode(mode) {
17349
- return typeof mode === 'string' && mode.startsWith('no-repeat-');
17350
- }
17351
- const NO_REPEAT_SIZING_MAP = {
17352
- 'no-repeat-cover': 'cover',
17353
- 'no-repeat-contain': 'contain',
17354
- 'no-repeat-fill': 'fill',
17355
- 'no-repeat-auto': 'auto'
17356
- };
17357
- function resolveBackgroundDrawMode({ backgroundMode, backgroundFit, backgroundKeepAspectRatio }) {
17358
- const sizing = NO_REPEAT_SIZING_MAP[backgroundMode];
17359
- if (sizing) {
17360
- return {
17361
- backgroundRepeatMode: 'no-repeat',
17362
- backgroundSizing: sizing
17363
- };
17364
- }
17365
- return {
17366
- backgroundRepeatMode: backgroundMode,
17367
- backgroundSizing: resolveBackgroundSizing({
17368
- backgroundFit,
17369
- backgroundKeepAspectRatio
17370
- })
17371
- };
17372
- }
17373
- function isPercentageValue(value) {
17374
- return /^-?\d+(\.\d+)?%$/.test(value);
17375
- }
17376
- function parsePositionToken(value, remainSpace, startKeyword, centerKeyword, endKeyword) {
17377
- if (typeof value === 'number' && Number.isFinite(value)) {
17378
- return value;
17379
- }
17380
- const normalizedValue = `${value !== null && value !== void 0 ? value : ''}`.trim().toLowerCase();
17381
- if (!normalizedValue || normalizedValue === startKeyword) {
17382
- return 0;
17383
- }
17384
- if (normalizedValue === centerKeyword) {
17385
- return remainSpace / 2;
17386
- }
17387
- if (normalizedValue === endKeyword) {
17388
- return remainSpace;
17389
- }
17390
- if (isPercentageValue(normalizedValue)) {
17391
- return (remainSpace * parseFloat(normalizedValue)) / 100;
17392
- }
17393
- const parsedValue = Number(normalizedValue);
17394
- if (Number.isFinite(parsedValue)) {
17395
- return parsedValue;
17396
- }
17397
- return 0;
17398
- }
17399
- function normalizeBackgroundPosition(position) {
17400
- var _a, _b;
17401
- if (Array.isArray(position)) {
17402
- return [(_a = position[0]) !== null && _a !== void 0 ? _a : 'left', (_b = position[1]) !== null && _b !== void 0 ? _b : 'top'];
17403
- }
17404
- const normalizedPosition = `${position !== null && position !== void 0 ? position : 'top-left'}`.trim().toLowerCase().replace(/-/g, ' ');
17405
- const tokens = normalizedPosition.split(/\s+/).filter(Boolean);
17406
- if (tokens.length === 0) {
17407
- return ['left', 'top'];
17408
- }
17409
- if (tokens.length === 1) {
17410
- const token = tokens[0];
17411
- if (token === 'center') {
17412
- return ['center', 'center'];
17413
- }
17414
- if (verticalPositionKeywords.has(token)) {
17415
- return ['center', token];
17416
- }
17417
- return [token, 'center'];
17418
- }
17419
- let horizontal;
17420
- let vertical;
17421
- const genericTokens = [];
17422
- for (let i = 0; i < 2; i++) {
17423
- const token = tokens[i];
17424
- if (token === 'left' || token === 'right') {
17425
- horizontal = token;
17426
- continue;
17427
- }
17428
- if (token === 'top' || token === 'bottom') {
17429
- vertical = token;
17430
- continue;
17431
- }
17432
- genericTokens.push(token);
17433
- }
17434
- if (horizontal == null && genericTokens.length) {
17435
- horizontal = genericTokens.shift();
17436
- }
17437
- if (vertical == null && genericTokens.length) {
17438
- vertical = genericTokens.shift();
17439
- }
17440
- return [horizontal !== null && horizontal !== void 0 ? horizontal : 'left', vertical !== null && vertical !== void 0 ? vertical : 'top'];
17441
- }
17442
- function resolveBackgroundPosition(position, remainWidth, remainHeight) {
17443
- const [horizontalPosition, verticalPosition] = normalizeBackgroundPosition(position);
17444
- return {
17445
- x: parsePositionToken(horizontalPosition, remainWidth, 'left', 'center', 'right'),
17446
- y: parsePositionToken(verticalPosition, remainHeight, 'top', 'center', 'bottom')
17447
- };
17448
- }
17449
- function pickRenderableDimension(...values) {
17450
- for (const value of values) {
17451
- if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
17452
- return value;
17344
+ const { backgroundMode, backgroundFit, backgroundKeepAspectRatio, backgroundScale = 1, backgroundOffsetX = 0, backgroundOffsetY = 0 } = params;
17345
+ const targetW = b.width();
17346
+ const targetH = b.height();
17347
+ let w = targetW;
17348
+ let h = targetH;
17349
+ if (backgroundMode === 'no-repeat') {
17350
+ if (backgroundFit) {
17351
+ if (!backgroundKeepAspectRatio) {
17352
+ context.drawImage(data, b.x1, b.y1, b.width(), b.height());
17353
+ }
17354
+ else {
17355
+ const maxScale = Math.max(targetW / data.width, targetH / data.height);
17356
+ context.drawImage(data, b.x1 + backgroundOffsetX, b.y1 + backgroundOffsetY, data.width * maxScale * backgroundScale, data.height * maxScale * backgroundScale);
17357
+ }
17358
+ }
17359
+ else {
17360
+ const resW = data.width * backgroundScale;
17361
+ const resH = data.height * backgroundScale;
17362
+ context.drawImage(data, b.x1 + backgroundOffsetX, b.y1 + backgroundOffsetY, resW, resH);
17363
+ }
17453
17364
  }
17454
- }
17455
- return null;
17456
- }
17457
- function resolveRenderableImageSize(data) {
17458
- if (!data) {
17459
- return null;
17460
- }
17461
- const width = pickRenderableDimension(data.naturalWidth, data.videoWidth, data.width);
17462
- const height = pickRenderableDimension(data.naturalHeight, data.videoHeight, data.height);
17463
- if (width == null || height == null) {
17464
- return null;
17465
- }
17466
- return { width, height };
17467
- }
17468
- function drawBackgroundImage(context, data, b, params) {
17469
- var _a, _b;
17470
- const { backgroundMode, backgroundFit, backgroundKeepAspectRatio, backgroundScale = 1, backgroundOffsetX = 0, backgroundOffsetY = 0, backgroundPosition = 'top-left' } = params;
17471
- const targetW = b.width();
17472
- const targetH = b.height();
17473
- const sourceSize = resolveRenderableImageSize(data);
17474
- const { backgroundRepeatMode, backgroundSizing: resolvedBackgroundSizing } = resolveBackgroundDrawMode({
17475
- backgroundMode,
17476
- backgroundFit,
17477
- backgroundKeepAspectRatio
17478
- });
17479
- let w = targetW;
17480
- let h = targetH;
17481
- if (targetW <= 0 || targetH <= 0) {
17482
- return;
17483
- }
17484
- if (backgroundRepeatMode === 'no-repeat') {
17485
- let drawWidth = (_a = sourceSize === null || sourceSize === void 0 ? void 0 : sourceSize.width) !== null && _a !== void 0 ? _a : targetW;
17486
- let drawHeight = (_b = sourceSize === null || sourceSize === void 0 ? void 0 : sourceSize.height) !== null && _b !== void 0 ? _b : targetH;
17487
- if ((resolvedBackgroundSizing === 'cover' || resolvedBackgroundSizing === 'contain') && sourceSize) {
17488
- const scale = resolvedBackgroundSizing === 'cover'
17489
- ? Math.max(targetW / sourceSize.width, targetH / sourceSize.height)
17490
- : Math.min(targetW / sourceSize.width, targetH / sourceSize.height);
17491
- drawWidth = sourceSize.width * scale;
17492
- drawHeight = sourceSize.height * scale;
17493
- }
17494
- else if (resolvedBackgroundSizing === 'fill') {
17495
- drawWidth = targetW;
17496
- drawHeight = targetH;
17497
- }
17498
- drawWidth *= backgroundScale;
17499
- drawHeight *= backgroundScale;
17500
- const { x, y } = resolveBackgroundPosition(backgroundPosition, targetW - drawWidth, targetH - drawHeight);
17501
- context.drawImage(data, b.x1 + x + backgroundOffsetX, b.y1 + y + backgroundOffsetY, drawWidth, drawHeight);
17502
- return;
17503
- }
17504
- if (backgroundFit && backgroundRepeatMode !== 'repeat' && sourceSize) {
17505
- const resW = sourceSize.width;
17506
- const resH = sourceSize.height;
17507
- if (backgroundRepeatMode === 'repeat-x') {
17508
- const ratio = targetH / resH;
17509
- w = resW * ratio;
17510
- h = targetH;
17511
- }
17512
- else if (backgroundRepeatMode === 'repeat-y') {
17513
- const ratio = targetW / resW;
17514
- h = resH * ratio;
17515
- w = targetW;
17516
- }
17517
- const dpr = context.dpr;
17518
- const canvas = canvasAllocate.allocate({ width: w, height: h, dpr });
17519
- const ctx = canvas.getContext('2d');
17520
- if (ctx) {
17521
- ctx.inuse = true;
17522
- ctx.clearMatrix();
17523
- ctx.setTransformForCurrent(true);
17524
- ctx.clearRect(0, 0, w, h);
17525
- ctx.drawImage(data, 0, 0, w, h);
17526
- data = canvas.nativeCanvas;
17365
+ else {
17366
+ if (backgroundFit && backgroundMode !== 'repeat' && (data.width || data.height)) {
17367
+ const resW = data.width;
17368
+ const resH = data.height;
17369
+ if (backgroundMode === 'repeat-x') {
17370
+ const ratio = targetH / resH;
17371
+ w = resW * ratio;
17372
+ h = targetH;
17373
+ }
17374
+ else if (backgroundMode === 'repeat-y') {
17375
+ const ratio = targetW / resW;
17376
+ h = resH * ratio;
17377
+ w = targetW;
17378
+ }
17379
+ const dpr = context.dpr;
17380
+ const canvas = canvasAllocate.allocate({ width: w, height: h, dpr });
17381
+ const ctx = canvas.getContext('2d');
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);
17527
17399
  }
17528
- canvasAllocate.free(canvas);
17529
17400
  }
17530
- const dpr = context.dpr;
17531
- const pattern = context.createPattern(data, backgroundRepeatMode);
17532
- pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0]));
17533
- context.fillStyle = pattern;
17534
- context.translate(b.x1, b.y1);
17535
- context.fillRect(0, 0, targetW, targetH);
17536
- context.translate(-b.x1, -b.y1);
17537
17401
  }
17402
+ const defaultBaseBackgroundRenderContribution = new DefaultBaseBackgroundRenderContribution();
17538
17403
  let DefaultBaseInteractiveRenderContribution = class DefaultBaseInteractiveRenderContribution {
17539
17404
  constructor(subRenderContribitions) {
17540
17405
  this.subRenderContribitions = subRenderContribitions;
@@ -17769,36 +17634,48 @@ class DefaultBaseTextureRenderContribution {
17769
17634
  drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding) {
17770
17635
  var _a;
17771
17636
  const { textureRatio = graphicAttribute.textureRatio, textureOptions = null } = graphic.attribute;
17772
- let pattern = this.textureMap.get(texture);
17637
+ let pattern = null;
17638
+ const patternKey = this.getPatternCacheKey(texture, textureSize, texturePadding, textureColor, context.dpr);
17639
+ if (patternKey !== null) {
17640
+ pattern = this.textureMap.get(patternKey);
17641
+ }
17773
17642
  if (!pattern) {
17774
- switch (texture) {
17775
- case 'circle':
17776
- pattern = this.createCirclePattern(textureSize, texturePadding, textureColor, context);
17777
- break;
17778
- case 'diamond':
17779
- pattern = this.createDiamondPattern(textureSize, texturePadding, textureColor, context);
17780
- break;
17781
- case 'rect':
17782
- pattern = this.createRectPattern(textureSize, texturePadding, textureColor, context);
17783
- break;
17784
- case 'vertical-line':
17785
- pattern = this.createVerticalLinePattern(textureSize, texturePadding, textureColor, context);
17786
- break;
17787
- case 'horizontal-line':
17788
- pattern = this.createHorizontalLinePattern(textureSize, texturePadding, textureColor, context);
17789
- break;
17790
- case 'bias-lr':
17791
- pattern = this.createBiasLRLinePattern(textureSize, texturePadding, textureColor, context);
17792
- break;
17793
- case 'bias-rl':
17794
- pattern = this.createBiasRLLinePattern(textureSize, texturePadding, textureColor, context);
17795
- break;
17796
- case 'grid':
17797
- pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
17798
- break;
17643
+ if (typeof texture === 'string') {
17644
+ switch (texture) {
17645
+ case 'circle':
17646
+ pattern = this.createCirclePattern(textureSize, texturePadding, textureColor, context);
17647
+ break;
17648
+ case 'diamond':
17649
+ pattern = this.createDiamondPattern(textureSize, texturePadding, textureColor, context);
17650
+ break;
17651
+ case 'rect':
17652
+ pattern = this.createRectPattern(textureSize, texturePadding, textureColor, context);
17653
+ break;
17654
+ case 'vertical-line':
17655
+ pattern = this.createVerticalLinePattern(textureSize, texturePadding, textureColor, context);
17656
+ break;
17657
+ case 'horizontal-line':
17658
+ pattern = this.createHorizontalLinePattern(textureSize, texturePadding, textureColor, context);
17659
+ break;
17660
+ case 'bias-lr':
17661
+ pattern = this.createBiasLRLinePattern(textureSize, texturePadding, textureColor, context);
17662
+ break;
17663
+ case 'bias-rl':
17664
+ pattern = this.createBiasRLLinePattern(textureSize, texturePadding, textureColor, context);
17665
+ break;
17666
+ case 'grid':
17667
+ pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
17668
+ break;
17669
+ }
17670
+ }
17671
+ if (!pattern) {
17672
+ pattern = this.createResourcePattern(texture, graphic, context);
17673
+ }
17674
+ if (pattern && patternKey !== null) {
17675
+ this.textureMap.set(patternKey, pattern);
17799
17676
  }
17800
17677
  }
17801
- if (textureOptions && textureOptions.dynamicTexture) {
17678
+ if (typeof texture === 'string' && textureOptions && textureOptions.dynamicTexture) {
17802
17679
  const { gridConfig = {}, useNewCanvas } = textureOptions;
17803
17680
  const b = graphic.AABBBounds;
17804
17681
  x = b.x1;
@@ -17874,6 +17751,26 @@ class DefaultBaseTextureRenderContribution {
17874
17751
  context.restore();
17875
17752
  }
17876
17753
  }
17754
+ getPatternCacheKey(texture, textureSize, texturePadding, textureColor, dpr) {
17755
+ if (typeof texture !== 'string') {
17756
+ return texture;
17757
+ }
17758
+ if (texture === 'wave') {
17759
+ return null;
17760
+ }
17761
+ return `${texture}-${textureSize}-${texturePadding}-${textureColor}-${dpr}`;
17762
+ }
17763
+ createResourcePattern(texture, graphic, context) {
17764
+ var _a;
17765
+ const resource = (_a = graphic.resources) === null || _a === void 0 ? void 0 : _a.get(texture);
17766
+ const data = (resource === null || resource === void 0 ? void 0 : resource.state) === 'success' ? resource.data : typeof texture === 'object' ? texture : null;
17767
+ if (!data) {
17768
+ return null;
17769
+ }
17770
+ const pattern = context.createPattern(data, 'repeat');
17771
+ (pattern === null || pattern === void 0 ? void 0 : pattern.setTransform) && pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, 0, 0]));
17772
+ return pattern;
17773
+ }
17877
17774
  }
17878
17775
  const defaultBaseTextureRenderContribution = new DefaultBaseTextureRenderContribution();
17879
17776
 
@@ -17977,35 +17874,31 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
17977
17874
  this.time = BaseRenderContributionTime.beforeFillStroke;
17978
17875
  }
17979
17876
  drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
17980
- const { background, backgroundOpacity = graphicAttribute.backgroundOpacity, opacity = graphicAttribute.opacity, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY, backgroundClip = graphicAttribute.backgroundClip, backgroundPosition = graphicAttribute.backgroundPosition } = graphic.attribute;
17877
+ const { background, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY } = graphic.attribute;
17981
17878
  if (!background) {
17982
17879
  return;
17983
17880
  }
17984
17881
  if (graphic.backgroundImg && graphic.resources) {
17985
- const res = graphic.resources.get(getBackgroundImage(background));
17986
- if (!res || res.state !== 'success' || !res.data) {
17882
+ const res = graphic.resources.get(background);
17883
+ if (res.state !== 'success' || !res.data) {
17987
17884
  return;
17988
17885
  }
17989
17886
  context.highPerformanceSave();
17990
17887
  context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
17991
17888
  const b = graphic.AABBBounds;
17992
- context.globalAlpha = backgroundOpacity * opacity;
17993
- backgroundClip && context.clip();
17994
17889
  this.doDrawImage(context, res.data, b, {
17995
17890
  backgroundMode,
17996
17891
  backgroundFit,
17997
17892
  backgroundKeepAspectRatio,
17998
17893
  backgroundScale,
17999
17894
  backgroundOffsetX,
18000
- backgroundOffsetY,
18001
- backgroundPosition
17895
+ backgroundOffsetY
18002
17896
  });
18003
17897
  context.highPerformanceRestore();
18004
17898
  context.setTransformForCurrent();
18005
17899
  }
18006
17900
  else {
18007
17901
  context.highPerformanceSave();
18008
- context.globalAlpha = backgroundOpacity * opacity;
18009
17902
  context.fillStyle = background;
18010
17903
  context.fill();
18011
17904
  context.highPerformanceRestore();
@@ -20151,7 +20044,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
20151
20044
  }
20152
20045
  drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
20153
20046
  var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
20154
- const { backgroundOpacity = graphicAttribute.backgroundOpacity, opacity = graphicAttribute.opacity, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio, backgroundScale = graphicAttribute.backgroundScale, backgroundOffsetX = graphicAttribute.backgroundOffsetX, backgroundOffsetY = graphicAttribute.backgroundOffsetY, backgroundPosition = graphicAttribute.backgroundPosition, backgroundClip = graphicAttribute.backgroundClip, backgroundCornerRadius = graphicAttribute.backgroundCornerRadius } = graphic.attribute;
20047
+ const { backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit, backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio } = graphic.attribute;
20155
20048
  let { background } = graphic.attribute;
20156
20049
  if (!background) {
20157
20050
  return;
@@ -20174,20 +20067,20 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
20174
20067
  };
20175
20068
  save();
20176
20069
  let b;
20177
- const backgroundConfig = isObject(background) && background.background ? background : null;
20070
+ const shouldReCalBounds = isObject(background) && background.background;
20178
20071
  const onlyTranslate = graphic.transMatrix.onlyTranslate();
20179
- if (backgroundConfig) {
20072
+ if (shouldReCalBounds) {
20180
20073
  const _b = graphic.AABBBounds;
20181
- const x = ((_a = backgroundConfig.x) !== null && _a !== void 0 ? _a : _b.x1) + ((_c = backgroundConfig.dx) !== null && _c !== void 0 ? _c : 0);
20182
- const y = ((_d = backgroundConfig.y) !== null && _d !== void 0 ? _d : _b.y1) + ((_e = backgroundConfig.dy) !== null && _e !== void 0 ? _e : 0);
20183
- const w = (_f = backgroundConfig.width) !== null && _f !== void 0 ? _f : _b.width();
20184
- const h = (_g = backgroundConfig.height) !== null && _g !== void 0 ? _g : _b.height();
20074
+ const x = ((_a = background.x) !== null && _a !== void 0 ? _a : _b.x1) + ((_c = background.dx) !== null && _c !== void 0 ? _c : 0);
20075
+ const y = ((_d = background.y) !== null && _d !== void 0 ? _d : _b.y1) + ((_e = background.dy) !== null && _e !== void 0 ? _e : 0);
20076
+ const w = (_f = background.width) !== null && _f !== void 0 ? _f : _b.width();
20077
+ const h = (_g = background.height) !== null && _g !== void 0 ? _g : _b.height();
20185
20078
  b = boundsAllocate.allocate(x, y, x + w, y + h);
20186
- background = backgroundConfig.background;
20079
+ background = background.background;
20187
20080
  if (!onlyTranslate) {
20188
20081
  const w = b.width();
20189
20082
  const h = b.height();
20190
- b.set(((_h = backgroundConfig.x) !== null && _h !== void 0 ? _h : 0) + ((_j = backgroundConfig.dx) !== null && _j !== void 0 ? _j : 0), ((_k = backgroundConfig.y) !== null && _k !== void 0 ? _k : 0) + ((_l = backgroundConfig.dy) !== null && _l !== void 0 ? _l : 0), w, h);
20083
+ b.set(((_h = background.x) !== null && _h !== void 0 ? _h : 0) + ((_j = background.dx) !== null && _j !== void 0 ? _j : 0), ((_k = background.y) !== null && _k !== void 0 ? _k : 0) + ((_l = background.dy) !== null && _l !== void 0 ? _l : 0), w, h);
20191
20084
  }
20192
20085
  }
20193
20086
  else {
@@ -20198,7 +20091,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
20198
20091
  }
20199
20092
  if (graphic.backgroundImg && graphic.resources) {
20200
20093
  const res = graphic.resources.get(background);
20201
- if (!res || res.state !== 'success' || !res.data) {
20094
+ if (res.state !== 'success' || !res.data) {
20202
20095
  restore();
20203
20096
  return;
20204
20097
  }
@@ -20207,33 +20100,16 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
20207
20100
  else {
20208
20101
  context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
20209
20102
  }
20210
- context.globalAlpha = backgroundOpacity * opacity;
20211
- if (backgroundClip) {
20212
- context.beginPath();
20213
- if (backgroundCornerRadius) {
20214
- createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, true);
20215
- }
20216
- else {
20217
- context.rect(b.x1, b.y1, b.width(), b.height());
20218
- }
20219
- context.clip();
20220
- }
20221
- this.doDrawImage(context, res.data, b, {
20222
- backgroundMode,
20223
- backgroundFit,
20224
- backgroundKeepAspectRatio,
20225
- backgroundScale,
20226
- backgroundOffsetX,
20227
- backgroundOffsetY,
20228
- backgroundPosition
20229
- });
20103
+ context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
20104
+ this.doDrawImage(context, res.data, b, { backgroundMode, backgroundFit, backgroundKeepAspectRatio });
20230
20105
  context.highPerformanceRestore();
20231
20106
  context.setTransformForCurrent();
20232
20107
  }
20233
20108
  else {
20109
+ const { backgroundCornerRadius, backgroundOpacity = 1 } = graphic.attribute;
20234
20110
  context.highPerformanceSave();
20235
20111
  context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
20236
- context.globalAlpha = backgroundOpacity * opacity;
20112
+ context.globalAlpha = backgroundOpacity;
20237
20113
  context.fillStyle = background;
20238
20114
  if (backgroundCornerRadius) {
20239
20115
  createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, true);
@@ -20244,7 +20120,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
20244
20120
  }
20245
20121
  context.highPerformanceRestore();
20246
20122
  }
20247
- if (backgroundConfig) {
20123
+ if (shouldReCalBounds) {
20248
20124
  boundsAllocate.free(b);
20249
20125
  }
20250
20126
  restore();
@@ -20829,75 +20705,6 @@ DefaultCanvasGroupRender = __decorate([
20829
20705
  ], DefaultCanvasGroupRender);
20830
20706
 
20831
20707
  const repeatStr = ['', 'repeat-x', 'repeat-y', 'repeat'];
20832
- function resolveImageMode({ repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode }) {
20833
- const repeatMode = resolveImageRepeatMode(repeatX, repeatY);
20834
- return {
20835
- repeatMode,
20836
- sizingMode: repeatMode === 'no-repeat' ? imageMode !== null && imageMode !== void 0 ? imageMode : 'fill' : 'fill'
20837
- };
20838
- }
20839
- const IMAGE_MODE_TO_BACKGROUND_MODE = {
20840
- cover: 'no-repeat-cover',
20841
- contain: 'no-repeat-contain',
20842
- fill: 'no-repeat-fill',
20843
- auto: 'no-repeat-auto'
20844
- };
20845
- function resolveBackgroundParamsByImageSizing(sizingMode) {
20846
- return {
20847
- backgroundMode: IMAGE_MODE_TO_BACKGROUND_MODE[sizingMode],
20848
- backgroundFit: false,
20849
- backgroundKeepAspectRatio: false
20850
- };
20851
- }
20852
- function resolveImageRepeatMode(repeatX, repeatY) {
20853
- let repeat = 0;
20854
- if (repeatX === 'repeat') {
20855
- repeat |= 0b0001;
20856
- }
20857
- if (repeatY === 'repeat') {
20858
- repeat |= 0b0010;
20859
- }
20860
- return repeat ? repeatStr[repeat] : 'no-repeat';
20861
- }
20862
- function shouldClipImageByLayout({ repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode, imageScale = 1, imageOffsetX = 0, imageOffsetY = 0, imagePosition = 'top-left' }) {
20863
- const { repeatMode, sizingMode } = resolveImageMode({
20864
- repeatX,
20865
- repeatY,
20866
- imageMode
20867
- });
20868
- return (repeatMode === 'no-repeat' &&
20869
- (sizingMode === 'cover' || sizingMode === 'auto' || imageScale !== 1 || imageOffsetX !== 0 || imageOffsetY !== 0));
20870
- }
20871
- function drawImageWithLayout(context, data, x, y, width, height, { repeatX = 'no-repeat', repeatY = 'no-repeat', imageMode, imageScale = 1, imageOffsetX = 0, imageOffsetY = 0, imagePosition = 'top-left' }) {
20872
- const { repeatMode, sizingMode } = resolveImageMode({
20873
- repeatX,
20874
- repeatY,
20875
- imageMode
20876
- });
20877
- const imageBackgroundParams = repeatMode === 'no-repeat'
20878
- ? resolveBackgroundParamsByImageSizing(sizingMode)
20879
- : {
20880
- backgroundMode: repeatMode,
20881
- backgroundFit: false,
20882
- backgroundKeepAspectRatio: false
20883
- };
20884
- drawBackgroundImage(context, data, {
20885
- x1: x,
20886
- y1: y,
20887
- x2: x + width,
20888
- y2: y + height,
20889
- width: () => width,
20890
- height: () => height
20891
- }, {
20892
- backgroundMode: imageBackgroundParams.backgroundMode,
20893
- backgroundFit: imageBackgroundParams.backgroundFit,
20894
- backgroundKeepAspectRatio: imageBackgroundParams.backgroundKeepAspectRatio,
20895
- backgroundScale: imageScale,
20896
- backgroundOffsetX: imageOffsetX,
20897
- backgroundOffsetY: imageOffsetY,
20898
- backgroundPosition: imagePosition
20899
- });
20900
- }
20901
20708
  let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
20902
20709
  constructor(graphicRenderContributions) {
20903
20710
  super();
@@ -20908,7 +20715,7 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
20908
20715
  }
20909
20716
  drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
20910
20717
  const imageAttribute = getTheme(image).image;
20911
- const { repeatX = imageAttribute.repeatX, repeatY = imageAttribute.repeatY, x: originX = imageAttribute.x, y: originY = imageAttribute.y, cornerRadius = imageAttribute.cornerRadius, fillStrokeOrder = imageAttribute.fillStrokeOrder, cornerType = imageAttribute.cornerType, imageMode = imageAttribute.imageMode, imageScale = imageAttribute.imageScale, imageOffsetX = imageAttribute.imageOffsetX, imageOffsetY = imageAttribute.imageOffsetY, imagePosition = imageAttribute.imagePosition, image: url } = image.attribute;
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;
20912
20719
  const data = this.valid(image, imageAttribute, fillCb);
20913
20720
  if (!data) {
20914
20721
  return;
@@ -20924,13 +20731,13 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
20924
20731
  const width = image.width;
20925
20732
  const height = image.height;
20926
20733
  context.beginPath();
20927
- let needCornerClip = false;
20734
+ let needRestore = false;
20928
20735
  if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
20929
20736
  context.rect(x, y, width, height);
20930
20737
  }
20931
20738
  else {
20932
20739
  createRectPath(context, x, y, width, height, cornerRadius, cornerType !== 'bevel');
20933
- needCornerClip = true;
20740
+ needRestore = true;
20934
20741
  }
20935
20742
  context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
20936
20743
  const _runFill = () => {
@@ -20940,15 +20747,23 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
20940
20747
  }
20941
20748
  else if (fVisible) {
20942
20749
  context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
20943
- drawImageWithLayout(context, res.data, x, y, width, height, {
20944
- repeatX,
20945
- repeatY,
20946
- imageMode,
20947
- imageScale,
20948
- imageOffsetX,
20949
- imageOffsetY,
20950
- imagePosition
20951
- });
20750
+ let repeat = 0;
20751
+ if (repeatX === 'repeat') {
20752
+ repeat |= 0b0001;
20753
+ }
20754
+ if (repeatY === 'repeat') {
20755
+ repeat |= 0b0010;
20756
+ }
20757
+ if (repeat) {
20758
+ const pattern = context.createPattern(res.data, repeatStr[repeat]);
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
+ }
20952
20767
  }
20953
20768
  }
20954
20769
  };
@@ -20963,37 +20778,27 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
20963
20778
  }
20964
20779
  }
20965
20780
  };
20966
- const needLayoutClip = shouldClipImageByLayout({
20967
- repeatX,
20968
- repeatY,
20969
- imageMode,
20970
- imageScale,
20971
- imageOffsetX,
20972
- imageOffsetY,
20973
- imagePosition
20974
- });
20975
- const needClip = needCornerClip || needLayoutClip;
20976
20781
  if (!fillStrokeOrder) {
20977
- if (needClip) {
20782
+ if (needRestore) {
20978
20783
  context.save();
20979
20784
  context.clip();
20980
20785
  }
20981
20786
  this.beforeRenderStep(image, context, x, y, doFill, false, fVisible, false, imageAttribute, drawContext, fillCb);
20982
20787
  _runFill();
20983
- if (needClip) {
20788
+ if (needRestore) {
20984
20789
  context.restore();
20985
20790
  }
20986
20791
  _runStroke();
20987
20792
  }
20988
20793
  else {
20989
20794
  _runStroke();
20990
- if (needClip) {
20795
+ if (needRestore) {
20991
20796
  context.save();
20992
20797
  context.clip();
20993
20798
  }
20994
20799
  this.beforeRenderStep(image, context, x, y, doFill, false, fVisible, false, imageAttribute, drawContext, fillCb);
20995
20800
  _runFill();
20996
- if (needClip) {
20801
+ if (needRestore) {
20997
20802
  context.restore();
20998
20803
  }
20999
20804
  }
@@ -22247,7 +22052,7 @@ let DefaultDrawContribution = class DefaultDrawContribution {
22247
22052
  return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
22248
22053
  }
22249
22054
  clearScreen(renderService, context, drawContext) {
22250
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
22055
+ var _a, _b, _c;
22251
22056
  const { clear, viewBox } = drawContext;
22252
22057
  const x = 0;
22253
22058
  const y = 0;
@@ -22259,24 +22064,11 @@ let DefaultDrawContribution = class DefaultDrawContribution {
22259
22064
  renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
22260
22065
  }
22261
22066
  const stage = (_b = renderService.drawParams) === null || _b === void 0 ? void 0 : _b.stage;
22262
- if (stage) {
22263
- context.globalAlpha =
22264
- ((_c = stage.attribute.opacity) !== null && _c !== void 0 ? _c : 1) * ((_d = stage.attribute.backgroundOpacity) !== null && _d !== void 0 ? _d : 1);
22265
- }
22067
+ stage && (context.globalAlpha = (_c = stage.attribute.opacity) !== null && _c !== void 0 ? _c : 1);
22266
22068
  if (stage && stage.backgroundImg && stage.resources) {
22267
- const res = stage.resources.get(getBackgroundImage(clear));
22069
+ const res = stage.resources.get(clear);
22268
22070
  if (res && res.state === 'success' && res.data) {
22269
- const backgroundBounds = boundsAllocate.allocate(x, y, x + width, y + height);
22270
- drawBackgroundImage(context, res.data, backgroundBounds, {
22271
- backgroundMode: (_e = stage.attribute.backgroundMode) !== null && _e !== void 0 ? _e : DefaultAttribute.backgroundMode,
22272
- backgroundFit: (_f = stage.attribute.backgroundFit) !== null && _f !== void 0 ? _f : DefaultAttribute.backgroundFit,
22273
- backgroundKeepAspectRatio: (_g = stage.attribute.backgroundKeepAspectRatio) !== null && _g !== void 0 ? _g : DefaultAttribute.backgroundKeepAspectRatio,
22274
- backgroundScale: (_h = stage.attribute.backgroundScale) !== null && _h !== void 0 ? _h : DefaultAttribute.backgroundScale,
22275
- backgroundOffsetX: (_j = stage.attribute.backgroundOffsetX) !== null && _j !== void 0 ? _j : DefaultAttribute.backgroundOffsetX,
22276
- backgroundOffsetY: (_k = stage.attribute.backgroundOffsetY) !== null && _k !== void 0 ? _k : DefaultAttribute.backgroundOffsetY,
22277
- backgroundPosition: (_l = stage.attribute.backgroundPosition) !== null && _l !== void 0 ? _l : DefaultAttribute.backgroundPosition
22278
- });
22279
- boundsAllocate.free(backgroundBounds);
22071
+ context.drawImage(res.data, x, y, width, height);
22280
22072
  }
22281
22073
  }
22282
22074
  else {
@@ -23042,7 +22834,6 @@ class Stage extends Group {
23042
22834
  }
23043
22835
  set background(b) {
23044
22836
  this._background = b;
23045
- this.syncBackgroundImage(b);
23046
22837
  }
23047
22838
  get defaultLayer() {
23048
22839
  return this.at(0);
@@ -23062,30 +22853,6 @@ class Stage extends Group {
23062
22853
  this._ticker = ticker;
23063
22854
  this._ticker.on('tick', this.afterTickCb);
23064
22855
  }
23065
- syncBackgroundImage(background) {
23066
- var _a;
23067
- const source = (_a = background === null || background === void 0 ? void 0 : background.background) !== null && _a !== void 0 ? _a : background;
23068
- this.backgroundImg = false;
23069
- if (this.isImageBackgroundSource(source)) {
23070
- this.loadImage(source, true);
23071
- }
23072
- }
23073
- isImageBackgroundSource(source) {
23074
- if (!source) {
23075
- return false;
23076
- }
23077
- if (typeof source === 'string') {
23078
- return source.startsWith('<svg') || isValidUrl(source) || source.includes('/') || isBase64(source);
23079
- }
23080
- if (!isObject(source)) {
23081
- return false;
23082
- }
23083
- const gradientSource = source;
23084
- if (typeof gradientSource.gradient === 'string' && Array.isArray(gradientSource.stops)) {
23085
- return false;
23086
- }
23087
- return true;
23088
- }
23089
22856
  constructor(params = {}) {
23090
22857
  var _a, _b;
23091
22858
  super({});
@@ -23202,8 +22969,8 @@ class Stage extends Group {
23202
22969
  };
23203
22970
  }
23204
22971
  this.optmize(params.optimize);
23205
- if (params.background) {
23206
- this.syncBackgroundImage(this._background);
22972
+ if (params.background && isString(this._background) && this._background.includes('/')) {
22973
+ this.setAttributes({ background: this._background });
23207
22974
  }
23208
22975
  this.initAnimate(params);
23209
22976
  this.rafId = (_b = params.rafId) !== null && _b !== void 0 ? _b : Math.floor(Math.random() * 6);
@@ -28382,4 +28149,4 @@ const registerFlexLayoutPlugin = () => {
28382
28149
  Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
28383
28150
  };
28384
28151
 
28385
- export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, Star, StarRender, StarRenderContribution, StaticLayerHandlerContribution, Step, StepClosed, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createEventTransformer, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getBackgroundImage, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNoRepeatSizingMode, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiInject, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldClipImageByLayout, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformMat4, transformPointForCanvas, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
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 };