@leafer-draw/worker 1.0.5 → 1.0.7

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/dist/worker.js CHANGED
@@ -555,6 +555,12 @@ var LeaferUI = (function (exports) {
555
555
  to.y = t.y + sin$4(r) * distance;
556
556
  return to;
557
557
  },
558
+ toNumberPoints(originPoints) {
559
+ let points = originPoints;
560
+ if (typeof originPoints[0] === 'object')
561
+ points = [], originPoints.forEach(p => points.push(p.x, p.y));
562
+ return points;
563
+ },
558
564
  reset(t) {
559
565
  P$5.reset(t);
560
566
  }
@@ -1545,7 +1551,10 @@ var LeaferUI = (function (exports) {
1545
1551
 
1546
1552
  class LeafData {
1547
1553
  get __useNaturalRatio() { return true; }
1548
- get __isLinePath() { return this.path && this.path.length === 6; }
1554
+ get __isLinePath() {
1555
+ const { path } = this;
1556
+ return path && path.length === 6 && path[0] === 1;
1557
+ }
1549
1558
  get __blendMode() {
1550
1559
  if (this.eraser && this.eraser !== 'path')
1551
1560
  return 'destination-out';
@@ -2308,11 +2317,12 @@ var LeaferUI = (function (exports) {
2308
2317
 
2309
2318
  const { sin: sin$3, cos: cos$3, atan2: atan2$1, ceil: ceil$1, abs: abs$3, PI: PI$2, sqrt: sqrt$1, pow } = Math;
2310
2319
  const { setPoint: setPoint$2, addPoint: addPoint$2 } = TwoPointBoundsHelper;
2311
- const { set } = PointHelper;
2320
+ const { set, toNumberPoints } = PointHelper;
2312
2321
  const { M: M$5, L: L$6, C: C$5, Q: Q$4, Z: Z$5 } = PathCommandMap;
2313
2322
  const tempPoint$2 = {};
2314
2323
  const BezierHelper = {
2315
- points(data, points, curve, close) {
2324
+ points(data, originPoints, curve, close) {
2325
+ let points = toNumberPoints(originPoints);
2316
2326
  data.push(M$5, points[0], points[1]);
2317
2327
  if (curve && points.length > 5) {
2318
2328
  let aX, aY, bX, bY, cX, cY, c1X, c1Y, c2X, c2Y;
@@ -2821,6 +2831,27 @@ var LeaferUI = (function (exports) {
2821
2831
  }
2822
2832
  return data;
2823
2833
  },
2834
+ objectToCanvasData(list) {
2835
+ const data = [];
2836
+ list.forEach(item => {
2837
+ switch (item.name) {
2838
+ case 'M':
2839
+ data.push(M$4, item.x, item.y);
2840
+ break;
2841
+ case 'L':
2842
+ data.push(L$5, item.x, item.y);
2843
+ break;
2844
+ case 'C':
2845
+ data.push(C$4, item.x1, item.y1, item.x2, item.y2, item.x, item.y);
2846
+ break;
2847
+ case 'Q':
2848
+ data.push(Q$3, item.x1, item.y1, item.x, item.y);
2849
+ break;
2850
+ case 'Z': data.push(Z$4);
2851
+ }
2852
+ });
2853
+ return data;
2854
+ },
2824
2855
  copyData(data, old, index, count) {
2825
2856
  for (let i = index, end = index + count; i < end; i++) {
2826
2857
  data.push(old[i]);
@@ -4398,13 +4429,10 @@ var LeaferUI = (function (exports) {
4398
4429
  update() {
4399
4430
  const { leafer } = this.leaf;
4400
4431
  if (leafer) {
4401
- if (leafer.ready) {
4402
- if (leafer.watcher.changed)
4403
- leafer.layouter.layout();
4404
- }
4405
- else {
4432
+ if (leafer.ready)
4433
+ leafer.watcher.changed && leafer.layouter.layout();
4434
+ else
4406
4435
  leafer.start();
4407
- }
4408
4436
  }
4409
4437
  else {
4410
4438
  let root = this.leaf;
@@ -5162,7 +5190,7 @@ var LeaferUI = (function (exports) {
5162
5190
  if (this.__worldOpacity) {
5163
5191
  canvas.setWorld(this.__nowWorld = this.__getNowWorld(options));
5164
5192
  this.__drawRenderPath(canvas);
5165
- this.__.windingRule ? canvas.clip(this.__.windingRule) : canvas.clip();
5193
+ this.windingRule ? canvas.clip(this.windingRule) : canvas.clip();
5166
5194
  }
5167
5195
  },
5168
5196
  __updateWorldOpacity() {
@@ -5679,11 +5707,17 @@ var LeaferUI = (function (exports) {
5679
5707
  add(child, index) {
5680
5708
  if (child === this)
5681
5709
  return;
5682
- child.__ || (child = UICreator.get(child.tag, child));
5710
+ const noIndex = index === undefined;
5711
+ if (!child.__) {
5712
+ if (child instanceof Array)
5713
+ return child.forEach(item => { this.add(item, index); noIndex || index++; });
5714
+ else
5715
+ child = UICreator.get(child.tag, child);
5716
+ }
5683
5717
  if (child.parent)
5684
5718
  child.parent.remove(child);
5685
5719
  child.parent = this;
5686
- index === undefined ? this.children.push(child) : this.children.splice(index, 0, child);
5720
+ noIndex ? this.children.push(child) : this.children.splice(index, 0, child);
5687
5721
  if (child.isBranch)
5688
5722
  this.__.__childBranchNumber = (this.__.__childBranchNumber || 0) + 1;
5689
5723
  child.__layout.boxChanged || child.__layout.boxChange();
@@ -5697,9 +5731,7 @@ var LeaferUI = (function (exports) {
5697
5731
  }
5698
5732
  this.__layout.affectChildrenSort && this.__layout.childrenSortChange();
5699
5733
  }
5700
- addMany(...children) {
5701
- children.forEach(child => this.add(child));
5702
- }
5734
+ addMany(...children) { this.add(children); }
5703
5735
  remove(child, destroy) {
5704
5736
  if (child) {
5705
5737
  if (child.__) {
@@ -5927,7 +5959,7 @@ var LeaferUI = (function (exports) {
5927
5959
  }
5928
5960
  }
5929
5961
 
5930
- const version = "1.0.5";
5962
+ const version = "1.0.7";
5931
5963
 
5932
5964
  class LeaferCanvas extends LeaferCanvasBase {
5933
5965
  get allowBackgroundColor() { return true; }
@@ -6636,6 +6668,13 @@ var LeaferUI = (function (exports) {
6636
6668
 
6637
6669
  const TextConvert = {};
6638
6670
  const ColorConvert = {};
6671
+ const UnitConvert = {
6672
+ number(value, percentRefer) {
6673
+ if (typeof value === 'object')
6674
+ return value.type === 'percent' ? value.value * percentRefer : value.value;
6675
+ return value;
6676
+ }
6677
+ };
6639
6678
  const PathArrow = {};
6640
6679
  const Paint = {};
6641
6680
  const PaintImage = {};
@@ -6656,7 +6695,7 @@ var LeaferUI = (function (exports) {
6656
6695
  }
6657
6696
  };
6658
6697
 
6659
- const { parse } = PathConvert;
6698
+ const { parse, objectToCanvasData } = PathConvert;
6660
6699
  const emptyPaint = {};
6661
6700
  const debug$2 = Debug.get('UIData');
6662
6701
  class UIData extends LeafData {
@@ -6670,10 +6709,11 @@ var LeaferUI = (function (exports) {
6670
6709
  scaleX = -scaleX;
6671
6710
  return scaleX > 1 ? strokeWidth / scaleX : strokeWidth;
6672
6711
  }
6673
- else {
6712
+ else
6674
6713
  return strokeWidth;
6675
- }
6676
6714
  }
6715
+ get __hasStroke() { return this.stroke && this.strokeWidth; }
6716
+ get __clipAfterFill() { return (this.cornerRadius || this.__pathInputed); }
6677
6717
  get __autoWidth() { return !this._width; }
6678
6718
  get __autoHeight() { return !this._height; }
6679
6719
  get __autoSide() { return !this._width || !this._height; }
@@ -6690,9 +6730,8 @@ var LeaferUI = (function (exports) {
6690
6730
  this.__leaf.scaleX *= -1;
6691
6731
  debug$2.warn('width < 0, instead -scaleX ', this);
6692
6732
  }
6693
- else {
6733
+ else
6694
6734
  this._width = value;
6695
- }
6696
6735
  }
6697
6736
  setHeight(value) {
6698
6737
  if (value < 0) {
@@ -6700,9 +6739,8 @@ var LeaferUI = (function (exports) {
6700
6739
  this.__leaf.scaleY *= -1;
6701
6740
  debug$2.warn('height < 0, instead -scaleY', this);
6702
6741
  }
6703
- else {
6742
+ else
6704
6743
  this._height = value;
6705
- }
6706
6744
  }
6707
6745
  setFill(value) {
6708
6746
  if (this.__naturalWidth)
@@ -6743,9 +6781,10 @@ var LeaferUI = (function (exports) {
6743
6781
  }
6744
6782
  }
6745
6783
  setPath(value) {
6746
- if (typeof value === 'string') {
6784
+ const isString = typeof value === 'string';
6785
+ if (isString || (value && typeof value[0] === 'object')) {
6747
6786
  this.__setInput('path', value);
6748
- this._path = parse(value);
6787
+ this._path = isString ? parse(value) : objectToCanvasData(value);
6749
6788
  }
6750
6789
  else {
6751
6790
  if (this.__input)
@@ -6760,12 +6799,8 @@ var LeaferUI = (function (exports) {
6760
6799
  value = value.filter((item) => item.visible !== false);
6761
6800
  this._shadow = value.length ? value : null;
6762
6801
  }
6763
- else if (value) {
6764
- this._shadow = value.visible === false ? null : [value];
6765
- }
6766
- else {
6767
- this._shadow = null;
6768
- }
6802
+ else
6803
+ this._shadow = value && value.visible !== false ? [value] : null;
6769
6804
  }
6770
6805
  setInnerShadow(value) {
6771
6806
  this.__setInput('innerShadow', value);
@@ -6774,12 +6809,8 @@ var LeaferUI = (function (exports) {
6774
6809
  value = value.filter((item) => item.visible !== false);
6775
6810
  this._innerShadow = value.length ? value : null;
6776
6811
  }
6777
- else if (value) {
6778
- this._innerShadow = value.visible === false ? null : [value];
6779
- }
6780
- else {
6781
- this._innerShadow = null;
6782
- }
6812
+ else
6813
+ this._innerShadow = value && value.visible !== false ? [value] : null;
6783
6814
  }
6784
6815
  __computePaint() {
6785
6816
  const { fill, stroke } = this.__input;
@@ -6790,24 +6821,19 @@ var LeaferUI = (function (exports) {
6790
6821
  this.__needComputePaint = false;
6791
6822
  }
6792
6823
  }
6793
- const UnitConvert = {
6794
- number(value, percentRefer) {
6795
- if (typeof value === 'object')
6796
- return value.type === 'percent' ? value.value * percentRefer : value.value;
6797
- return value;
6798
- }
6799
- };
6800
6824
 
6801
6825
  class GroupData extends UIData {
6802
6826
  }
6803
6827
 
6804
6828
  class BoxData extends GroupData {
6805
6829
  get __boxStroke() { return !this.__pathInputed; }
6830
+ get __drawAfterFill() { return this.overflow === 'hide' && this.__clipAfterFill && this.__leaf.children.length; }
6831
+ get __clipAfterFill() { return this.__leaf.isOverflow || super.__clipAfterFill; }
6806
6832
  }
6807
6833
 
6808
6834
  class LeaferData extends GroupData {
6809
- __getInputData() {
6810
- const data = super.__getInputData();
6835
+ __getInputData(names, options) {
6836
+ const data = super.__getInputData(names, options);
6811
6837
  canvasSizeAttrs.forEach(key => delete data[key]);
6812
6838
  return data;
6813
6839
  }
@@ -6834,6 +6860,7 @@ var LeaferUI = (function (exports) {
6834
6860
  }
6835
6861
 
6836
6862
  class PathData extends UIData {
6863
+ get __pathInputed() { return 2; }
6837
6864
  }
6838
6865
 
6839
6866
  class PenData extends GroupData {
@@ -6880,16 +6907,18 @@ var LeaferUI = (function (exports) {
6880
6907
  delete data.fill;
6881
6908
  return data;
6882
6909
  }
6883
- __getInputData() {
6884
- const data = super.__getInputData();
6910
+ __getInputData(names, options) {
6911
+ const data = super.__getInputData(names, options);
6885
6912
  delete data.fill;
6886
6913
  return data;
6887
6914
  }
6888
6915
  }
6889
6916
 
6890
6917
  class CanvasData extends RectData {
6891
- __getInputData() {
6892
- const data = super.__getInputData();
6918
+ get __isCanvas() { return true; }
6919
+ get __drawAfterFill() { return true; }
6920
+ __getInputData(names, options) {
6921
+ const data = super.__getInputData(names, options);
6893
6922
  data.url = this.__leaf.canvas.toDataURL('image/png');
6894
6923
  return data;
6895
6924
  }
@@ -6916,16 +6945,12 @@ var LeaferUI = (function (exports) {
6916
6945
  let width = 0;
6917
6946
  const { shadow, innerShadow, blur, backgroundBlur } = this.__;
6918
6947
  if (shadow)
6919
- shadow.forEach(item => {
6920
- width = Math.max(width, Math.max(Math.abs(item.y), Math.abs(item.x)) + (item.spread > 0 ? item.spread : 0) + item.blur * 1.5);
6921
- });
6948
+ shadow.forEach(item => width = Math.max(width, Math.max(Math.abs(item.y), Math.abs(item.x)) + (item.spread > 0 ? item.spread : 0) + item.blur * 1.5));
6922
6949
  if (blur)
6923
6950
  width = Math.max(width, blur);
6924
6951
  let shapeWidth = width = Math.ceil(width);
6925
6952
  if (innerShadow)
6926
- innerShadow.forEach(item => {
6927
- shapeWidth = Math.max(shapeWidth, Math.max(Math.abs(item.y), Math.abs(item.x)) + (item.spread < 0 ? -item.spread : 0) + item.blur * 1.5);
6928
- });
6953
+ innerShadow.forEach(item => shapeWidth = Math.max(shapeWidth, Math.max(Math.abs(item.y), Math.abs(item.x)) + (item.spread < 0 ? -item.spread : 0) + item.blur * 1.5));
6929
6954
  if (backgroundBlur)
6930
6955
  shapeWidth = Math.max(shapeWidth, backgroundBlur);
6931
6956
  this.__layout.renderShapeSpread = shapeWidth;
@@ -7007,6 +7032,16 @@ var LeaferUI = (function (exports) {
7007
7032
  if (stroke && !ignoreStroke)
7008
7033
  this.__.__pixelStroke ? Paint.strokes(stroke, this, canvas) : Paint.stroke('#000000', this, canvas);
7009
7034
  }
7035
+ },
7036
+ __drawAfterFill(canvas, options) {
7037
+ if (this.__.__clipAfterFill) {
7038
+ canvas.save();
7039
+ this.windingRule ? canvas.clip(this.windingRule) : canvas.clip();
7040
+ this.__drawContent(canvas, options);
7041
+ canvas.restore();
7042
+ }
7043
+ else
7044
+ this.__drawContent(canvas, options);
7010
7045
  }
7011
7046
  };
7012
7047
  function drawFast(ui, canvas, options) {
@@ -7073,8 +7108,8 @@ var LeaferUI = (function (exports) {
7073
7108
  return pen;
7074
7109
  }
7075
7110
  get editConfig() { return undefined; }
7076
- get editOuter() { return this.__.__isLinePath ? 'LineEditTool' : 'EditTool'; }
7077
- get editInner() { return 'PathEditor'; }
7111
+ get editOuter() { return ''; }
7112
+ get editInner() { return ''; }
7078
7113
  constructor(data) {
7079
7114
  super(data);
7080
7115
  }
@@ -7085,9 +7120,8 @@ var LeaferUI = (function (exports) {
7085
7120
  Object.assign(this, data);
7086
7121
  this.lockNormalStyle = false;
7087
7122
  }
7088
- else {
7123
+ else
7089
7124
  Object.assign(this, data);
7090
- }
7091
7125
  }
7092
7126
  get(name) {
7093
7127
  return typeof name === 'string' ? this.__.__getInput(name) : this.__.__getInputData(name);
@@ -7389,23 +7423,13 @@ var LeaferUI = (function (exports) {
7389
7423
  if (data.children) {
7390
7424
  const { children } = data;
7391
7425
  delete data.children;
7392
- if (!this.children) {
7393
- this.__setBranch();
7394
- }
7395
- else {
7396
- this.clear();
7397
- }
7426
+ this.children ? this.clear() : this.__setBranch();
7398
7427
  super.set(data, isTemp);
7399
- let child;
7400
- children.forEach(childData => {
7401
- child = childData.__ ? childData : UICreator.get(childData.tag, childData);
7402
- this.add(child);
7403
- });
7428
+ children.forEach(child => this.add(child));
7404
7429
  data.children = children;
7405
7430
  }
7406
- else {
7431
+ else
7407
7432
  super.set(data, isTemp);
7408
- }
7409
7433
  }
7410
7434
  toJSON(options) {
7411
7435
  const data = super.toJSON(options);
@@ -7837,9 +7861,7 @@ var LeaferUI = (function (exports) {
7837
7861
  }
7838
7862
  __updateStrokeSpread() { return 0; }
7839
7863
  __updateRectRenderSpread() { return 0; }
7840
- __updateRenderSpread() {
7841
- return this.__updateRectRenderSpread() || -1;
7842
- }
7864
+ __updateRenderSpread() { return this.__updateRectRenderSpread() || -1; }
7843
7865
  __updateRectBoxBounds() { }
7844
7866
  __updateBoxBounds(_secondLayout) {
7845
7867
  const data = this.__;
@@ -7859,13 +7881,11 @@ var LeaferUI = (function (exports) {
7859
7881
  }
7860
7882
  this.__updateNaturalSize();
7861
7883
  }
7862
- else {
7884
+ else
7863
7885
  this.__updateRectBoxBounds();
7864
- }
7865
7886
  }
7866
- else {
7887
+ else
7867
7888
  this.__updateRectBoxBounds();
7868
- }
7869
7889
  }
7870
7890
  __updateStrokeBounds() { }
7871
7891
  __updateRenderBounds() {
@@ -7875,14 +7895,13 @@ var LeaferUI = (function (exports) {
7875
7895
  super.__updateRenderBounds();
7876
7896
  copy$2(childrenRenderBounds, renderBounds);
7877
7897
  this.__updateRectRenderBounds();
7878
- isOverflow = !includes$1(renderBounds, childrenRenderBounds) || !this.pathInputed || !this.__.cornerRadius;
7898
+ isOverflow = !includes$1(renderBounds, childrenRenderBounds);
7899
+ if (isOverflow && this.__.overflow !== 'hide')
7900
+ add(renderBounds, childrenRenderBounds);
7879
7901
  }
7880
- else {
7902
+ else
7881
7903
  this.__updateRectRenderBounds();
7882
- }
7883
- this.isOverflow !== isOverflow && (this.isOverflow = isOverflow);
7884
- if (!(this.__.__drawAfterFill = this.__.overflow === 'hide') && isOverflow)
7885
- add(renderBounds, childrenRenderBounds);
7904
+ !this.isOverflow !== !isOverflow && (this.isOverflow = isOverflow);
7886
7905
  }
7887
7906
  __updateRectRenderBounds() { }
7888
7907
  __updateRectChange() { }
@@ -7902,20 +7921,9 @@ var LeaferUI = (function (exports) {
7902
7921
  this.__renderGroup(canvas, options);
7903
7922
  }
7904
7923
  }
7905
- __drawAfterFill(canvas, options) {
7906
- const { length } = this.children;
7907
- if (this.isOverflow) {
7908
- canvas.save();
7909
- canvas.clip();
7910
- if (length)
7911
- this.__renderGroup(canvas, options);
7912
- canvas.restore();
7913
- }
7914
- else {
7915
- if (length)
7916
- this.__renderGroup(canvas, options);
7917
- }
7918
- if (this.__.stroke && length) {
7924
+ __drawContent(canvas, options) {
7925
+ this.__renderGroup(canvas, options);
7926
+ if (this.__.__hasStroke) {
7919
7927
  canvas.setWorld(this.__nowWorld);
7920
7928
  this.__drawRenderPath(canvas);
7921
7929
  }
@@ -8079,17 +8087,15 @@ var LeaferUI = (function (exports) {
8079
8087
  if (data.__useArrow)
8080
8088
  PathArrow.addArrows(this, false);
8081
8089
  }
8082
- else {
8090
+ else
8083
8091
  super.__updateRenderPath();
8084
- }
8085
8092
  }
8086
8093
  __updateBoxBounds() {
8087
8094
  if (this.points) {
8088
8095
  toBounds$1(this.__.__pathForRender, this.__layout.boxBounds);
8089
8096
  }
8090
- else {
8097
+ else
8091
8098
  super.__updateBoxBounds();
8092
- }
8093
8099
  }
8094
8100
  };
8095
8101
  __decorate([
@@ -8227,7 +8233,6 @@ var LeaferUI = (function (exports) {
8227
8233
  super(data);
8228
8234
  this.canvas = Creator.canvas(this.__);
8229
8235
  this.context = this.canvas.context;
8230
- this.__.__isCanvas = this.__.__drawAfterFill = true;
8231
8236
  if (data && data.url)
8232
8237
  this.drawImage(data.url);
8233
8238
  }
@@ -8240,8 +8245,7 @@ var LeaferUI = (function (exports) {
8240
8245
  });
8241
8246
  }
8242
8247
  draw(ui, offset, scale, rotation) {
8243
- ui.__layout.update();
8244
- const matrix = new Matrix(ui.__world).invert();
8248
+ const matrix = new Matrix(ui.worldTransform).invert();
8245
8249
  const m = new Matrix();
8246
8250
  if (offset)
8247
8251
  m.translate(offset.x, offset.y);
@@ -8256,17 +8260,9 @@ var LeaferUI = (function (exports) {
8256
8260
  paint() {
8257
8261
  this.forceRender();
8258
8262
  }
8259
- __drawAfterFill(canvas, _options) {
8260
- const { width, height, cornerRadius } = this.__, { view } = this.canvas;
8261
- if (cornerRadius || this.pathInputed) {
8262
- canvas.save();
8263
- canvas.clip();
8264
- canvas.drawImage(view, 0, 0, view.width, view.height, 0, 0, width, height);
8265
- canvas.restore();
8266
- }
8267
- else {
8268
- canvas.drawImage(view, 0, 0, view.width, view.height, 0, 0, width, height);
8269
- }
8263
+ __drawContent(canvas, _options) {
8264
+ const { width, height } = this.__, { view } = this.canvas;
8265
+ canvas.drawImage(view, 0, 0, view.width, view.height, 0, 0, width, height);
8270
8266
  }
8271
8267
  __updateSize() {
8272
8268
  const { canvas } = this;
@@ -8310,7 +8306,6 @@ var LeaferUI = (function (exports) {
8310
8306
  const { copyAndSpread, includes, isSame: isSame$1, spread, setList } = BoundsHelper;
8311
8307
  exports.Text = class Text extends exports.UI {
8312
8308
  get __tag() { return 'Text'; }
8313
- get editInner() { return 'TextEditor'; }
8314
8309
  get textDrawData() {
8315
8310
  this.__layout.update();
8316
8311
  return this.__.__textDrawData;
@@ -8385,9 +8380,8 @@ var LeaferUI = (function (exports) {
8385
8380
  layout.renderChanged = true;
8386
8381
  setList(data.__textBoxBounds = {}, [b, bounds]);
8387
8382
  }
8388
- else {
8383
+ else
8389
8384
  data.__textBoxBounds = contentBounds;
8390
- }
8391
8385
  }
8392
8386
  __updateRenderSpread() {
8393
8387
  let width = super.__updateRenderSpread();
@@ -8476,7 +8470,6 @@ var LeaferUI = (function (exports) {
8476
8470
  get __tag() { return 'Path'; }
8477
8471
  constructor(data) {
8478
8472
  super(data);
8479
- this.__.__pathInputed = 2;
8480
8473
  }
8481
8474
  };
8482
8475
  __decorate([
@@ -9154,7 +9147,7 @@ var LeaferUI = (function (exports) {
9154
9147
  }
9155
9148
  if (allowPaint) {
9156
9149
  canvas.save();
9157
- canvas.clip();
9150
+ ui.windingRule ? canvas.clip(ui.windingRule) : canvas.clip();
9158
9151
  if (paint.blendMode)
9159
9152
  canvas.blendMode = paint.blendMode;
9160
9153
  if (data.opacity)