konva 9.2.0 → 9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/konva.js +239 -660
- package/konva.min.js +3 -3
- package/lib/Animation.d.ts +4 -4
- package/lib/Animation.js +27 -26
- package/lib/Container.d.ts +7 -6
- package/lib/Container.js +2 -3
- package/lib/Context.d.ts +24 -24
- package/lib/Context.js +51 -51
- package/lib/DragAndDrop.d.ts +2 -2
- package/lib/Factory.d.ts +2 -1
- package/lib/Global.d.ts +3 -3
- package/lib/Global.js +2 -2
- package/lib/Layer.d.ts +4 -4
- package/lib/Node.d.ts +15 -15
- package/lib/Node.js +15 -12
- package/lib/PointerEvents.d.ts +1 -1
- package/lib/Shape.d.ts +6 -6
- package/lib/Shape.js +9 -4
- package/lib/Stage.d.ts +10 -10
- package/lib/Stage.js +24 -21
- package/lib/Tween.d.ts +3 -3
- package/lib/Util.d.ts +58 -18
- package/lib/Util.js +7 -3
- package/lib/Validators.d.ts +9 -9
- package/lib/_CoreInternals.d.ts +62 -22
- package/lib/_FullInternals.d.ts +62 -22
- package/lib/filters/Blur.js +49 -512
- package/lib/shapes/Path.d.ts +6 -6
- package/lib/shapes/Path.js +1 -1
- package/lib/shapes/RegularPolygon.d.ts +4 -4
- package/lib/shapes/Text.d.ts +1 -0
- package/lib/shapes/Text.js +9 -0
- package/lib/shapes/TextPath.d.ts +6 -5
- package/lib/shapes/Transformer.d.ts +4 -2
- package/lib/shapes/Transformer.js +21 -14
- package/lib/types.d.ts +1 -1
- package/package.json +9 -9
package/konva.js
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
* Konva JavaScript Framework v9.2.
|
|
8
|
+
* Konva JavaScript Framework v9.2.1
|
|
9
9
|
* http://konvajs.org/
|
|
10
10
|
* Licensed under the MIT
|
|
11
|
-
* Date:
|
|
11
|
+
* Date: Thu Sep 14 2023
|
|
12
12
|
*
|
|
13
13
|
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
|
14
14
|
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
|
|
15
15
|
*
|
|
16
16
|
* @license
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
const PI_OVER_180 = Math.PI / 180;
|
|
19
19
|
/**
|
|
20
20
|
* @namespace Konva
|
|
21
21
|
*/
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
: {};
|
|
36
36
|
const Konva$2 = {
|
|
37
37
|
_global: glob,
|
|
38
|
-
version: '9.2.
|
|
38
|
+
version: '9.2.1',
|
|
39
39
|
isBrowser: detectBrowser(),
|
|
40
40
|
isUnminified: /param/.test(function (param) { }.toString()),
|
|
41
41
|
dblClickWindow: 400,
|
|
@@ -1109,7 +1109,7 @@
|
|
|
1109
1109
|
releaseCanvas(...canvases) {
|
|
1110
1110
|
if (!Konva$2.releaseCanvasOnDestroy)
|
|
1111
1111
|
return;
|
|
1112
|
-
canvases.forEach(c => {
|
|
1112
|
+
canvases.forEach((c) => {
|
|
1113
1113
|
c.width = 0;
|
|
1114
1114
|
c.height = 0;
|
|
1115
1115
|
});
|
|
@@ -1120,7 +1120,11 @@
|
|
|
1120
1120
|
let bottomLeft = 0;
|
|
1121
1121
|
let bottomRight = 0;
|
|
1122
1122
|
if (typeof cornerRadius === 'number') {
|
|
1123
|
-
topLeft =
|
|
1123
|
+
topLeft =
|
|
1124
|
+
topRight =
|
|
1125
|
+
bottomLeft =
|
|
1126
|
+
bottomRight =
|
|
1127
|
+
Math.min(cornerRadius, width / 2, height / 2);
|
|
1124
1128
|
}
|
|
1125
1129
|
else {
|
|
1126
1130
|
topLeft = Math.min(cornerRadius[0] || 0, width / 2, height / 2);
|
|
@@ -1137,7 +1141,7 @@
|
|
|
1137
1141
|
context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);
|
|
1138
1142
|
context.lineTo(0, topLeft);
|
|
1139
1143
|
context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);
|
|
1140
|
-
}
|
|
1144
|
+
},
|
|
1141
1145
|
};
|
|
1142
1146
|
|
|
1143
1147
|
function _formatValue(val) {
|
|
@@ -1677,16 +1681,17 @@
|
|
|
1677
1681
|
* @method
|
|
1678
1682
|
* @name Konva.Context#arc
|
|
1679
1683
|
*/
|
|
1680
|
-
arc(
|
|
1681
|
-
this._context.arc(
|
|
1684
|
+
arc(x, y, radius, startAngle, endAngle, counterClockwise) {
|
|
1685
|
+
this._context.arc(x, y, radius, startAngle, endAngle, counterClockwise);
|
|
1682
1686
|
}
|
|
1683
1687
|
/**
|
|
1684
1688
|
* arcTo function.
|
|
1685
1689
|
* @method
|
|
1686
1690
|
* @name Konva.Context#arcTo
|
|
1691
|
+
*
|
|
1687
1692
|
*/
|
|
1688
|
-
arcTo(
|
|
1689
|
-
this._context.arcTo(
|
|
1693
|
+
arcTo(x1, y1, x2, y2, radius) {
|
|
1694
|
+
this._context.arcTo(x1, y1, x2, y2, radius);
|
|
1690
1695
|
}
|
|
1691
1696
|
/**
|
|
1692
1697
|
* beginPath function.
|
|
@@ -1701,16 +1706,16 @@
|
|
|
1701
1706
|
* @method
|
|
1702
1707
|
* @name Konva.Context#bezierCurveTo
|
|
1703
1708
|
*/
|
|
1704
|
-
bezierCurveTo(
|
|
1705
|
-
this._context.bezierCurveTo(
|
|
1709
|
+
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
|
|
1710
|
+
this._context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);
|
|
1706
1711
|
}
|
|
1707
1712
|
/**
|
|
1708
1713
|
* clearRect function.
|
|
1709
1714
|
* @method
|
|
1710
1715
|
* @name Konva.Context#clearRect
|
|
1711
1716
|
*/
|
|
1712
|
-
clearRect(
|
|
1713
|
-
this._context.clearRect(
|
|
1717
|
+
clearRect(x, y, width, height) {
|
|
1718
|
+
this._context.clearRect(x, y, width, height);
|
|
1714
1719
|
}
|
|
1715
1720
|
clip(...args) {
|
|
1716
1721
|
this._context.clip.apply(this._context, args);
|
|
@@ -1728,13 +1733,13 @@
|
|
|
1728
1733
|
* @method
|
|
1729
1734
|
* @name Konva.Context#createImageData
|
|
1730
1735
|
*/
|
|
1731
|
-
createImageData(
|
|
1736
|
+
createImageData(width, height) {
|
|
1732
1737
|
var a = arguments;
|
|
1733
1738
|
if (a.length === 2) {
|
|
1734
|
-
return this._context.createImageData(
|
|
1739
|
+
return this._context.createImageData(width, height);
|
|
1735
1740
|
}
|
|
1736
1741
|
else if (a.length === 1) {
|
|
1737
|
-
return this._context.createImageData(
|
|
1742
|
+
return this._context.createImageData(width);
|
|
1738
1743
|
}
|
|
1739
1744
|
}
|
|
1740
1745
|
/**
|
|
@@ -1742,41 +1747,41 @@
|
|
|
1742
1747
|
* @method
|
|
1743
1748
|
* @name Konva.Context#createLinearGradient
|
|
1744
1749
|
*/
|
|
1745
|
-
createLinearGradient(
|
|
1746
|
-
return this._context.createLinearGradient(
|
|
1750
|
+
createLinearGradient(x0, y0, x1, y1) {
|
|
1751
|
+
return this._context.createLinearGradient(x0, y0, x1, y1);
|
|
1747
1752
|
}
|
|
1748
1753
|
/**
|
|
1749
1754
|
* createPattern function.
|
|
1750
1755
|
* @method
|
|
1751
1756
|
* @name Konva.Context#createPattern
|
|
1752
1757
|
*/
|
|
1753
|
-
createPattern(
|
|
1754
|
-
return this._context.createPattern(
|
|
1758
|
+
createPattern(image, repetition) {
|
|
1759
|
+
return this._context.createPattern(image, repetition);
|
|
1755
1760
|
}
|
|
1756
1761
|
/**
|
|
1757
1762
|
* createRadialGradient function.
|
|
1758
1763
|
* @method
|
|
1759
1764
|
* @name Konva.Context#createRadialGradient
|
|
1760
1765
|
*/
|
|
1761
|
-
createRadialGradient(
|
|
1762
|
-
return this._context.createRadialGradient(
|
|
1766
|
+
createRadialGradient(x0, y0, r0, x1, y1, r1) {
|
|
1767
|
+
return this._context.createRadialGradient(x0, y0, r0, x1, y1, r1);
|
|
1763
1768
|
}
|
|
1764
1769
|
/**
|
|
1765
1770
|
* drawImage function.
|
|
1766
1771
|
* @method
|
|
1767
1772
|
* @name Konva.Context#drawImage
|
|
1768
1773
|
*/
|
|
1769
|
-
drawImage(
|
|
1774
|
+
drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) {
|
|
1770
1775
|
// this._context.drawImage(...arguments);
|
|
1771
1776
|
var a = arguments, _context = this._context;
|
|
1772
1777
|
if (a.length === 3) {
|
|
1773
|
-
_context.drawImage(
|
|
1778
|
+
_context.drawImage(image, sx, sy);
|
|
1774
1779
|
}
|
|
1775
1780
|
else if (a.length === 5) {
|
|
1776
|
-
_context.drawImage(
|
|
1781
|
+
_context.drawImage(image, sx, sy, sWidth, sHeight);
|
|
1777
1782
|
}
|
|
1778
1783
|
else if (a.length === 9) {
|
|
1779
|
-
_context.drawImage(
|
|
1784
|
+
_context.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);
|
|
1780
1785
|
}
|
|
1781
1786
|
}
|
|
1782
1787
|
/**
|
|
@@ -1784,8 +1789,8 @@
|
|
|
1784
1789
|
* @method
|
|
1785
1790
|
* @name Konva.Context#ellipse
|
|
1786
1791
|
*/
|
|
1787
|
-
ellipse(
|
|
1788
|
-
this._context.ellipse(
|
|
1792
|
+
ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, counterclockwise) {
|
|
1793
|
+
this._context.ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, counterclockwise);
|
|
1789
1794
|
}
|
|
1790
1795
|
/**
|
|
1791
1796
|
* isPointInPath function.
|
|
@@ -1844,48 +1849,48 @@
|
|
|
1844
1849
|
* @method
|
|
1845
1850
|
* @name Konva.Context#getImageData
|
|
1846
1851
|
*/
|
|
1847
|
-
getImageData(
|
|
1848
|
-
return this._context.getImageData(
|
|
1852
|
+
getImageData(sx, sy, sw, sh) {
|
|
1853
|
+
return this._context.getImageData(sx, sy, sw, sh);
|
|
1849
1854
|
}
|
|
1850
1855
|
/**
|
|
1851
1856
|
* lineTo function.
|
|
1852
1857
|
* @method
|
|
1853
1858
|
* @name Konva.Context#lineTo
|
|
1854
1859
|
*/
|
|
1855
|
-
lineTo(
|
|
1856
|
-
this._context.lineTo(
|
|
1860
|
+
lineTo(x, y) {
|
|
1861
|
+
this._context.lineTo(x, y);
|
|
1857
1862
|
}
|
|
1858
1863
|
/**
|
|
1859
1864
|
* moveTo function.
|
|
1860
1865
|
* @method
|
|
1861
1866
|
* @name Konva.Context#moveTo
|
|
1862
1867
|
*/
|
|
1863
|
-
moveTo(
|
|
1864
|
-
this._context.moveTo(
|
|
1868
|
+
moveTo(x, y) {
|
|
1869
|
+
this._context.moveTo(x, y);
|
|
1865
1870
|
}
|
|
1866
1871
|
/**
|
|
1867
1872
|
* rect function.
|
|
1868
1873
|
* @method
|
|
1869
1874
|
* @name Konva.Context#rect
|
|
1870
1875
|
*/
|
|
1871
|
-
rect(
|
|
1872
|
-
this._context.rect(
|
|
1876
|
+
rect(x, y, width, height) {
|
|
1877
|
+
this._context.rect(x, y, width, height);
|
|
1873
1878
|
}
|
|
1874
1879
|
/**
|
|
1875
1880
|
* putImageData function.
|
|
1876
1881
|
* @method
|
|
1877
1882
|
* @name Konva.Context#putImageData
|
|
1878
1883
|
*/
|
|
1879
|
-
putImageData(
|
|
1880
|
-
this._context.putImageData(
|
|
1884
|
+
putImageData(imageData, dx, dy) {
|
|
1885
|
+
this._context.putImageData(imageData, dx, dy);
|
|
1881
1886
|
}
|
|
1882
1887
|
/**
|
|
1883
1888
|
* quadraticCurveTo function.
|
|
1884
1889
|
* @method
|
|
1885
1890
|
* @name Konva.Context#quadraticCurveTo
|
|
1886
1891
|
*/
|
|
1887
|
-
quadraticCurveTo(
|
|
1888
|
-
this._context.quadraticCurveTo(
|
|
1892
|
+
quadraticCurveTo(cpx, cpy, x, y) {
|
|
1893
|
+
this._context.quadraticCurveTo(cpx, cpy, x, y);
|
|
1889
1894
|
}
|
|
1890
1895
|
/**
|
|
1891
1896
|
* restore function.
|
|
@@ -1900,8 +1905,8 @@
|
|
|
1900
1905
|
* @method
|
|
1901
1906
|
* @name Konva.Context#rotate
|
|
1902
1907
|
*/
|
|
1903
|
-
rotate(
|
|
1904
|
-
this._context.rotate(
|
|
1908
|
+
rotate(angle) {
|
|
1909
|
+
this._context.rotate(angle);
|
|
1905
1910
|
}
|
|
1906
1911
|
/**
|
|
1907
1912
|
* save function.
|
|
@@ -1916,26 +1921,26 @@
|
|
|
1916
1921
|
* @method
|
|
1917
1922
|
* @name Konva.Context#scale
|
|
1918
1923
|
*/
|
|
1919
|
-
scale(
|
|
1920
|
-
this._context.scale(
|
|
1924
|
+
scale(x, y) {
|
|
1925
|
+
this._context.scale(x, y);
|
|
1921
1926
|
}
|
|
1922
1927
|
/**
|
|
1923
1928
|
* setLineDash function.
|
|
1924
1929
|
* @method
|
|
1925
1930
|
* @name Konva.Context#setLineDash
|
|
1926
1931
|
*/
|
|
1927
|
-
setLineDash(
|
|
1932
|
+
setLineDash(segments) {
|
|
1928
1933
|
// works for Chrome and IE11
|
|
1929
1934
|
if (this._context.setLineDash) {
|
|
1930
|
-
this._context.setLineDash(
|
|
1935
|
+
this._context.setLineDash(segments);
|
|
1931
1936
|
}
|
|
1932
1937
|
else if ('mozDash' in this._context) {
|
|
1933
1938
|
// verified that this works in firefox
|
|
1934
|
-
this._context['mozDash'] =
|
|
1939
|
+
this._context['mozDash'] = segments;
|
|
1935
1940
|
}
|
|
1936
1941
|
else if ('webkitLineDash' in this._context) {
|
|
1937
1942
|
// does not currently work for Safari
|
|
1938
|
-
this._context['webkitLineDash'] =
|
|
1943
|
+
this._context['webkitLineDash'] = segments;
|
|
1939
1944
|
}
|
|
1940
1945
|
// no support for IE9 and IE10
|
|
1941
1946
|
}
|
|
@@ -1952,8 +1957,8 @@
|
|
|
1952
1957
|
* @method
|
|
1953
1958
|
* @name Konva.Context#setTransform
|
|
1954
1959
|
*/
|
|
1955
|
-
setTransform(
|
|
1956
|
-
this._context.setTransform(
|
|
1960
|
+
setTransform(a, b, c, d, e, f) {
|
|
1961
|
+
this._context.setTransform(a, b, c, d, e, f);
|
|
1957
1962
|
}
|
|
1958
1963
|
/**
|
|
1959
1964
|
* stroke function.
|
|
@@ -1973,24 +1978,24 @@
|
|
|
1973
1978
|
* @method
|
|
1974
1979
|
* @name Konva.Context#strokeText
|
|
1975
1980
|
*/
|
|
1976
|
-
strokeText(
|
|
1977
|
-
this._context.strokeText(
|
|
1981
|
+
strokeText(text, x, y, maxWidth) {
|
|
1982
|
+
this._context.strokeText(text, x, y, maxWidth);
|
|
1978
1983
|
}
|
|
1979
1984
|
/**
|
|
1980
1985
|
* transform function.
|
|
1981
1986
|
* @method
|
|
1982
1987
|
* @name Konva.Context#transform
|
|
1983
1988
|
*/
|
|
1984
|
-
transform(
|
|
1985
|
-
this._context.transform(
|
|
1989
|
+
transform(a, b, c, d, e, f) {
|
|
1990
|
+
this._context.transform(a, b, c, d, e, f);
|
|
1986
1991
|
}
|
|
1987
1992
|
/**
|
|
1988
1993
|
* translate function.
|
|
1989
1994
|
* @method
|
|
1990
1995
|
* @name Konva.Context#translate
|
|
1991
1996
|
*/
|
|
1992
|
-
translate(
|
|
1993
|
-
this._context.translate(
|
|
1997
|
+
translate(x, y) {
|
|
1998
|
+
this._context.translate(x, y);
|
|
1994
1999
|
}
|
|
1995
2000
|
_enableTrace() {
|
|
1996
2001
|
var that = this, len = CONTEXT_METHODS.length, origSetter = this.setAttr, n, args;
|
|
@@ -2681,7 +2686,7 @@
|
|
|
2681
2686
|
conf.height === undefined) {
|
|
2682
2687
|
rect = this.getClientRect({
|
|
2683
2688
|
skipTransform: true,
|
|
2684
|
-
relativeTo: this.getParent(),
|
|
2689
|
+
relativeTo: this.getParent() || undefined,
|
|
2685
2690
|
});
|
|
2686
2691
|
}
|
|
2687
2692
|
var width = Math.ceil(conf.width || rect.width), height = Math.ceil(conf.height || rect.height), pixelRatio = conf.pixelRatio, x = conf.x === undefined ? Math.floor(rect.x) : conf.x, y = conf.y === undefined ? Math.floor(rect.y) : conf.y, offset = conf.offset || 0, drawBorder = conf.drawBorder || false, hitCanvasPixelRatio = conf.hitCanvasPixelRatio || 1;
|
|
@@ -2818,7 +2823,7 @@
|
|
|
2818
2823
|
{ x: rect.x + rect.width, y: rect.y + rect.height },
|
|
2819
2824
|
{ x: rect.x, y: rect.y + rect.height },
|
|
2820
2825
|
];
|
|
2821
|
-
var minX, minY, maxX, maxY;
|
|
2826
|
+
var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
2822
2827
|
var trans = this.getAbsoluteTransform(top);
|
|
2823
2828
|
points.forEach(function (point) {
|
|
2824
2829
|
var transformed = trans.point(point);
|
|
@@ -3320,8 +3325,9 @@
|
|
|
3320
3325
|
addChildren(nodes);
|
|
3321
3326
|
}
|
|
3322
3327
|
}
|
|
3323
|
-
|
|
3324
|
-
|
|
3328
|
+
const stage = this.getStage();
|
|
3329
|
+
if (that.nodeType !== UPPER_STAGE && stage) {
|
|
3330
|
+
addChildren(stage.getChildren());
|
|
3325
3331
|
}
|
|
3326
3332
|
return index;
|
|
3327
3333
|
}
|
|
@@ -3381,11 +3387,12 @@
|
|
|
3381
3387
|
* rect.getRelativePointerPosition();
|
|
3382
3388
|
*/
|
|
3383
3389
|
getRelativePointerPosition() {
|
|
3384
|
-
|
|
3390
|
+
const stage = this.getStage();
|
|
3391
|
+
if (!stage) {
|
|
3385
3392
|
return null;
|
|
3386
3393
|
}
|
|
3387
3394
|
// get pointer (say mouse or touch) position
|
|
3388
|
-
var pos =
|
|
3395
|
+
var pos = stage.getPointerPosition();
|
|
3389
3396
|
if (!pos) {
|
|
3390
3397
|
return null;
|
|
3391
3398
|
}
|
|
@@ -3432,12 +3439,10 @@
|
|
|
3432
3439
|
return absoluteTransform.getTranslation();
|
|
3433
3440
|
}
|
|
3434
3441
|
setAbsolutePosition(pos) {
|
|
3435
|
-
|
|
3442
|
+
const { x, y, ...origTrans } = this._clearTransform();
|
|
3436
3443
|
// don't clear translation
|
|
3437
|
-
this.attrs.x =
|
|
3438
|
-
this.attrs.y =
|
|
3439
|
-
delete origTrans.x;
|
|
3440
|
-
delete origTrans.y;
|
|
3444
|
+
this.attrs.x = x;
|
|
3445
|
+
this.attrs.y = y;
|
|
3441
3446
|
// important, use non cached value
|
|
3442
3447
|
this._clearCache(TRANSFORM);
|
|
3443
3448
|
var it = this._getAbsoluteTransform().copy();
|
|
@@ -3831,7 +3836,7 @@
|
|
|
3831
3836
|
return parent.getStage();
|
|
3832
3837
|
}
|
|
3833
3838
|
else {
|
|
3834
|
-
return
|
|
3839
|
+
return null;
|
|
3835
3840
|
}
|
|
3836
3841
|
}
|
|
3837
3842
|
/**
|
|
@@ -4488,6 +4493,9 @@
|
|
|
4488
4493
|
var pointerId = evt ? evt.pointerId : undefined;
|
|
4489
4494
|
var stage = this.getStage();
|
|
4490
4495
|
var ap = this.getAbsolutePosition();
|
|
4496
|
+
if (!stage) {
|
|
4497
|
+
return;
|
|
4498
|
+
}
|
|
4491
4499
|
var pos = stage._getPointerById(pointerId) ||
|
|
4492
4500
|
stage._changedPointerPositions[0] ||
|
|
4493
4501
|
ap;
|
|
@@ -5534,7 +5542,7 @@
|
|
|
5534
5542
|
*/
|
|
5535
5543
|
getAllIntersections(pos) {
|
|
5536
5544
|
var arr = [];
|
|
5537
|
-
this.find('Shape').forEach(
|
|
5545
|
+
this.find('Shape').forEach((shape) => {
|
|
5538
5546
|
if (shape.isVisible() && shape.intersects(pos)) {
|
|
5539
5547
|
arr.push(shape);
|
|
5540
5548
|
}
|
|
@@ -5635,9 +5643,8 @@
|
|
|
5635
5643
|
context.restore();
|
|
5636
5644
|
}
|
|
5637
5645
|
}
|
|
5638
|
-
getClientRect(config) {
|
|
5646
|
+
getClientRect(config = {}) {
|
|
5639
5647
|
var _a;
|
|
5640
|
-
config = config || {};
|
|
5641
5648
|
var skipTransform = config.skipTransform;
|
|
5642
5649
|
var relativeTo = config.relativeTo;
|
|
5643
5650
|
var minX, minY, maxX, maxY;
|
|
@@ -6231,20 +6238,24 @@
|
|
|
6231
6238
|
_pointerenter(evt) {
|
|
6232
6239
|
this.setPointersPositions(evt);
|
|
6233
6240
|
const events = getEventsMap(evt.type);
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6241
|
+
if (events) {
|
|
6242
|
+
this._fire(events.pointerenter, {
|
|
6243
|
+
evt: evt,
|
|
6244
|
+
target: this,
|
|
6245
|
+
currentTarget: this,
|
|
6246
|
+
});
|
|
6247
|
+
}
|
|
6239
6248
|
}
|
|
6240
6249
|
_pointerover(evt) {
|
|
6241
6250
|
this.setPointersPositions(evt);
|
|
6242
6251
|
const events = getEventsMap(evt.type);
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6252
|
+
if (events) {
|
|
6253
|
+
this._fire(events.pointerover, {
|
|
6254
|
+
evt: evt,
|
|
6255
|
+
target: this,
|
|
6256
|
+
currentTarget: this,
|
|
6257
|
+
});
|
|
6258
|
+
}
|
|
6248
6259
|
}
|
|
6249
6260
|
_getTargetShape(evenType) {
|
|
6250
6261
|
let shape = this[evenType + 'targetShape'];
|
|
@@ -6284,7 +6295,7 @@
|
|
|
6284
6295
|
currentTarget: this,
|
|
6285
6296
|
});
|
|
6286
6297
|
}
|
|
6287
|
-
this.pointerPos =
|
|
6298
|
+
this.pointerPos = null;
|
|
6288
6299
|
this._pointerPositions = [];
|
|
6289
6300
|
}
|
|
6290
6301
|
_pointerdown(evt) {
|
|
@@ -6301,8 +6312,7 @@
|
|
|
6301
6312
|
// probably we are staring a click
|
|
6302
6313
|
Konva$2['_' + eventType + 'ListenClick'] = true;
|
|
6303
6314
|
// no shape detected? do nothing
|
|
6304
|
-
|
|
6305
|
-
if (!hasShape) {
|
|
6315
|
+
if (!shape || !shape.isListening()) {
|
|
6306
6316
|
return;
|
|
6307
6317
|
}
|
|
6308
6318
|
if (Konva$2.capturePointerEventsEnabled) {
|
|
@@ -6356,8 +6366,8 @@
|
|
|
6356
6366
|
const event = { evt: evt, pointerId };
|
|
6357
6367
|
var differentTarget = targetShape !== shape;
|
|
6358
6368
|
if (differentTarget && targetShape) {
|
|
6359
|
-
targetShape._fireAndBubble(events.pointerout,
|
|
6360
|
-
targetShape._fireAndBubble(events.pointerleave,
|
|
6369
|
+
targetShape._fireAndBubble(events.pointerout, { ...event }, shape);
|
|
6370
|
+
targetShape._fireAndBubble(events.pointerleave, { ...event }, shape);
|
|
6361
6371
|
}
|
|
6362
6372
|
if (shape) {
|
|
6363
6373
|
if (processedShapesIds[shape._id]) {
|
|
@@ -6368,11 +6378,11 @@
|
|
|
6368
6378
|
if (shape && shape.isListening()) {
|
|
6369
6379
|
triggeredOnShape = true;
|
|
6370
6380
|
if (differentTarget) {
|
|
6371
|
-
shape._fireAndBubble(events.pointerover,
|
|
6372
|
-
shape._fireAndBubble(events.pointerenter,
|
|
6381
|
+
shape._fireAndBubble(events.pointerover, { ...event }, targetShape);
|
|
6382
|
+
shape._fireAndBubble(events.pointerenter, { ...event }, targetShape);
|
|
6373
6383
|
this[eventType + 'targetShape'] = shape;
|
|
6374
6384
|
}
|
|
6375
|
-
shape._fireAndBubble(events.pointermove,
|
|
6385
|
+
shape._fireAndBubble(events.pointermove, { ...event });
|
|
6376
6386
|
}
|
|
6377
6387
|
else {
|
|
6378
6388
|
if (targetShape) {
|
|
@@ -6434,14 +6444,14 @@
|
|
|
6434
6444
|
if (shape && shape.isListening()) {
|
|
6435
6445
|
triggeredOnShape = true;
|
|
6436
6446
|
this[eventType + 'ClickEndShape'] = shape;
|
|
6437
|
-
shape._fireAndBubble(events.pointerup,
|
|
6447
|
+
shape._fireAndBubble(events.pointerup, { ...event });
|
|
6438
6448
|
// detect if click or double click occurred
|
|
6439
6449
|
if (Konva$2['_' + eventType + 'ListenClick'] &&
|
|
6440
6450
|
clickStartShape &&
|
|
6441
6451
|
clickStartShape === shape) {
|
|
6442
|
-
shape._fireAndBubble(events.pointerclick,
|
|
6452
|
+
shape._fireAndBubble(events.pointerclick, { ...event });
|
|
6443
6453
|
if (fireDblClick && clickEndShape && clickEndShape === shape) {
|
|
6444
|
-
shape._fireAndBubble(events.pointerdblclick,
|
|
6454
|
+
shape._fireAndBubble(events.pointerdblclick, { ...event });
|
|
6445
6455
|
}
|
|
6446
6456
|
}
|
|
6447
6457
|
}
|
|
@@ -7012,10 +7022,14 @@
|
|
|
7012
7022
|
* @returns {Boolean}
|
|
7013
7023
|
*/
|
|
7014
7024
|
intersects(point) {
|
|
7015
|
-
var stage = this.getStage()
|
|
7025
|
+
var stage = this.getStage();
|
|
7026
|
+
if (!stage) {
|
|
7027
|
+
return false;
|
|
7028
|
+
}
|
|
7029
|
+
const bufferHitCanvas = stage.bufferHitCanvas;
|
|
7016
7030
|
bufferHitCanvas.getContext().clear();
|
|
7017
|
-
this.drawHit(bufferHitCanvas,
|
|
7018
|
-
p = bufferHitCanvas.context.getImageData(Math.round(point.x), Math.round(point.y), 1, 1).data;
|
|
7031
|
+
this.drawHit(bufferHitCanvas, undefined, true);
|
|
7032
|
+
const p = bufferHitCanvas.context.getImageData(Math.round(point.x), Math.round(point.y), 1, 1).data;
|
|
7019
7033
|
return p[3] > 0;
|
|
7020
7034
|
}
|
|
7021
7035
|
destroy() {
|
|
@@ -7128,7 +7142,8 @@
|
|
|
7128
7142
|
// 1 - simple drawing when nothing is cached.
|
|
7129
7143
|
// 2 - when we are caching current
|
|
7130
7144
|
// 3 - when node is cached and we need to draw it into layer
|
|
7131
|
-
var layer = this.getLayer()
|
|
7145
|
+
var layer = this.getLayer();
|
|
7146
|
+
var canvas = can || layer.getCanvas(), context = canvas.getContext(), cachedCanvas = this._getCanvasCache(), drawFunc = this.getSceneFunc(), hasShadow = this.hasShadow(), stage, bufferCanvas, bufferContext;
|
|
7132
7147
|
var skipBuffer = canvas.isCache;
|
|
7133
7148
|
var cachingSelf = top === this;
|
|
7134
7149
|
if (!this.isVisible() && !cachingSelf) {
|
|
@@ -8276,7 +8291,7 @@
|
|
|
8276
8291
|
* var fillRule = shape.fillRule();
|
|
8277
8292
|
*
|
|
8278
8293
|
* // set fill rule
|
|
8279
|
-
* shape.fillRule('evenodd);
|
|
8294
|
+
* shape.fillRule('evenodd');
|
|
8280
8295
|
*/
|
|
8281
8296
|
Factory.backCompat(Shape, {
|
|
8282
8297
|
dashArray: 'dash',
|
|
@@ -8854,7 +8869,7 @@
|
|
|
8854
8869
|
Group.prototype.nodeType = 'Group';
|
|
8855
8870
|
_registerNode(Group);
|
|
8856
8871
|
|
|
8857
|
-
|
|
8872
|
+
const now = (function () {
|
|
8858
8873
|
if (glob.performance && glob.performance.now) {
|
|
8859
8874
|
return function () {
|
|
8860
8875
|
return glob.performance.now();
|
|
@@ -8906,20 +8921,10 @@
|
|
|
8906
8921
|
* @return {Konva.Animation} this
|
|
8907
8922
|
*/
|
|
8908
8923
|
setLayers(layers) {
|
|
8909
|
-
|
|
8924
|
+
let lays = [];
|
|
8910
8925
|
// if passing in no layers
|
|
8911
|
-
if (
|
|
8912
|
-
lays = [];
|
|
8913
|
-
}
|
|
8914
|
-
else if (layers.length > 0) {
|
|
8915
|
-
// if passing in an array of Layers
|
|
8916
|
-
// NOTE: layers could be an array. for simplicity, I'm just inspecting
|
|
8917
|
-
// the length property to check for both cases
|
|
8918
|
-
lays = layers;
|
|
8919
|
-
}
|
|
8920
|
-
else {
|
|
8921
|
-
// if passing in a Layer
|
|
8922
|
-
lays = [layers];
|
|
8926
|
+
if (layers) {
|
|
8927
|
+
lays = Array.isArray(layers) ? layers : [layers];
|
|
8923
8928
|
}
|
|
8924
8929
|
this.layers = lays;
|
|
8925
8930
|
return this;
|
|
@@ -8941,9 +8946,10 @@
|
|
|
8941
8946
|
* @return {Bool} true if layer is added to animation, otherwise false
|
|
8942
8947
|
*/
|
|
8943
8948
|
addLayer(layer) {
|
|
8944
|
-
|
|
8949
|
+
const layers = this.layers;
|
|
8950
|
+
const len = layers.length;
|
|
8945
8951
|
// don't add the layer if it already exists
|
|
8946
|
-
for (n = 0; n < len; n++) {
|
|
8952
|
+
for (let n = 0; n < len; n++) {
|
|
8947
8953
|
if (layers[n]._id === layer._id) {
|
|
8948
8954
|
return false;
|
|
8949
8955
|
}
|
|
@@ -8958,8 +8964,10 @@
|
|
|
8958
8964
|
* @return {Bool} is animation running?
|
|
8959
8965
|
*/
|
|
8960
8966
|
isRunning() {
|
|
8961
|
-
|
|
8962
|
-
|
|
8967
|
+
const a = Animation;
|
|
8968
|
+
const animations = a.animations;
|
|
8969
|
+
const len = animations.length;
|
|
8970
|
+
for (let n = 0; n < len; n++) {
|
|
8963
8971
|
if (animations[n].id === this.id) {
|
|
8964
8972
|
return true;
|
|
8965
8973
|
}
|
|
@@ -9000,8 +9008,10 @@
|
|
|
9000
9008
|
this._handleAnimation();
|
|
9001
9009
|
}
|
|
9002
9010
|
static _removeAnimation(anim) {
|
|
9003
|
-
|
|
9004
|
-
|
|
9011
|
+
const id = anim.id;
|
|
9012
|
+
const animations = this.animations;
|
|
9013
|
+
const len = animations.length;
|
|
9014
|
+
for (let n = 0; n < len; n++) {
|
|
9005
9015
|
if (animations[n].id === id) {
|
|
9006
9016
|
this.animations.splice(n, 1);
|
|
9007
9017
|
break;
|
|
@@ -9009,7 +9019,8 @@
|
|
|
9009
9019
|
}
|
|
9010
9020
|
}
|
|
9011
9021
|
static _runFrames() {
|
|
9012
|
-
|
|
9022
|
+
const layerHash = {};
|
|
9023
|
+
const animations = this.animations;
|
|
9013
9024
|
/*
|
|
9014
9025
|
* loop through all animations and execute animation
|
|
9015
9026
|
* function. if the animation object has specified node,
|
|
@@ -9021,13 +9032,14 @@
|
|
|
9021
9032
|
* WARNING: don't cache animations.length because it could change while
|
|
9022
9033
|
* the for loop is running, causing a JS error
|
|
9023
9034
|
*/
|
|
9024
|
-
for (n = 0; n < animations.length; n++) {
|
|
9025
|
-
anim = animations[n];
|
|
9026
|
-
layers = anim.layers;
|
|
9027
|
-
func = anim.func;
|
|
9035
|
+
for (let n = 0; n < animations.length; n++) {
|
|
9036
|
+
const anim = animations[n];
|
|
9037
|
+
const layers = anim.layers;
|
|
9038
|
+
const func = anim.func;
|
|
9028
9039
|
anim._updateFrameObject(now());
|
|
9029
|
-
layersLen = layers.length;
|
|
9040
|
+
const layersLen = layers.length;
|
|
9030
9041
|
// if animation object has a function, execute it
|
|
9042
|
+
let needRedraw;
|
|
9031
9043
|
if (func) {
|
|
9032
9044
|
// allow anim bypassing drawing
|
|
9033
9045
|
needRedraw = func.call(anim, anim.frame) !== false;
|
|
@@ -9038,14 +9050,14 @@
|
|
|
9038
9050
|
if (!needRedraw) {
|
|
9039
9051
|
continue;
|
|
9040
9052
|
}
|
|
9041
|
-
for (i = 0; i < layersLen; i++) {
|
|
9042
|
-
layer = layers[i];
|
|
9053
|
+
for (let i = 0; i < layersLen; i++) {
|
|
9054
|
+
const layer = layers[i];
|
|
9043
9055
|
if (layer._id !== undefined) {
|
|
9044
9056
|
layerHash[layer._id] = layer;
|
|
9045
9057
|
}
|
|
9046
9058
|
}
|
|
9047
9059
|
}
|
|
9048
|
-
for (key in layerHash) {
|
|
9060
|
+
for (let key in layerHash) {
|
|
9049
9061
|
if (!layerHash.hasOwnProperty(key)) {
|
|
9050
9062
|
continue;
|
|
9051
9063
|
}
|
|
@@ -9053,7 +9065,7 @@
|
|
|
9053
9065
|
}
|
|
9054
9066
|
}
|
|
9055
9067
|
static _animationLoop() {
|
|
9056
|
-
|
|
9068
|
+
const Anim = Animation;
|
|
9057
9069
|
if (Anim.animations.length) {
|
|
9058
9070
|
Anim._runFrames();
|
|
9059
9071
|
Util.requestAnimFrame(Anim._animationLoop);
|
|
@@ -11610,7 +11622,7 @@
|
|
|
11610
11622
|
// case for a trailing comma before next command
|
|
11611
11623
|
break;
|
|
11612
11624
|
}
|
|
11613
|
-
var cmd =
|
|
11625
|
+
var cmd = '';
|
|
11614
11626
|
var points = [];
|
|
11615
11627
|
var startX = cpx, startY = cpy;
|
|
11616
11628
|
// Move var from within the switch to up here (jshint)
|
|
@@ -14166,7 +14178,7 @@
|
|
|
14166
14178
|
* @param {Object} config
|
|
14167
14179
|
* @param {String} [config.fontFamily] default is Arial
|
|
14168
14180
|
* @param {Number} [config.fontSize] in pixels. Default is 12
|
|
14169
|
-
* @param {String} [config.fontStyle] can be 'normal', 'bold', '
|
|
14181
|
+
* @param {String} [config.fontStyle] can be 'normal', 'italic', or 'bold', '500' or even 'italic bold'. 'normal' is the default.
|
|
14170
14182
|
* @param {String} [config.fontVariant] can be normal or small-caps. Default is normal
|
|
14171
14183
|
* @param {String} [config.textDecoration] can be line-through, underline or empty string. Default is empty string.
|
|
14172
14184
|
* @param {String} config.text
|
|
@@ -14608,6 +14620,15 @@
|
|
|
14608
14620
|
getStrokeScaleEnabled() {
|
|
14609
14621
|
return true;
|
|
14610
14622
|
}
|
|
14623
|
+
_useBufferCanvas() {
|
|
14624
|
+
const hasLine = this.textDecoration().indexOf('underline') !== -1 ||
|
|
14625
|
+
this.textDecoration().indexOf('line-through') !== -1;
|
|
14626
|
+
const hasShadow = this.hasShadow();
|
|
14627
|
+
if (hasLine && hasShadow) {
|
|
14628
|
+
return true;
|
|
14629
|
+
}
|
|
14630
|
+
return super._useBufferCanvas();
|
|
14631
|
+
}
|
|
14611
14632
|
}
|
|
14612
14633
|
Text.prototype._fillFunc = _fillFunc$1;
|
|
14613
14634
|
Text.prototype._strokeFunc = _strokeFunc$1;
|
|
@@ -14686,7 +14707,7 @@
|
|
|
14686
14707
|
*/
|
|
14687
14708
|
Factory.addGetterSetter(Text, 'fontSize', 12, getNumberValidator());
|
|
14688
14709
|
/**
|
|
14689
|
-
* get/set font style. Can be 'normal', 'italic', or 'bold' or even 'italic bold'. 'normal' is the default.
|
|
14710
|
+
* get/set font style. Can be 'normal', 'italic', or 'bold', '500' or even 'italic bold'. 'normal' is the default.
|
|
14690
14711
|
* @name Konva.Text#fontStyle
|
|
14691
14712
|
* @method
|
|
14692
14713
|
* @param {String} fontStyle
|
|
@@ -14862,7 +14883,7 @@
|
|
|
14862
14883
|
* @param {Object} config
|
|
14863
14884
|
* @param {String} [config.fontFamily] default is Arial
|
|
14864
14885
|
* @param {Number} [config.fontSize] default is 12
|
|
14865
|
-
* @param {String} [config.fontStyle]
|
|
14886
|
+
* @param {String} [config.fontStyle] Can be 'normal', 'italic', or 'bold', '500' or even 'italic bold'. 'normal' is the default.
|
|
14866
14887
|
* @param {String} [config.fontVariant] can be normal or small-caps. Default is normal
|
|
14867
14888
|
* @param {String} [config.textBaseline] Can be 'top', 'bottom', 'middle', 'alphabetic', 'hanging'. Default is middle
|
|
14868
14889
|
* @param {String} config.text
|
|
@@ -15251,7 +15272,7 @@
|
|
|
15251
15272
|
*/
|
|
15252
15273
|
Factory.addGetterSetter(TextPath, 'fontSize', 12, getNumberValidator());
|
|
15253
15274
|
/**
|
|
15254
|
-
* get/set font style. Can be 'normal', 'italic', or 'bold'. 'normal' is the default.
|
|
15275
|
+
* get/set font style. Can be 'normal', 'italic', or 'bold', '500' or even 'italic bold'. 'normal' is the default.
|
|
15255
15276
|
* @name Konva.TextPath#fontStyle
|
|
15256
15277
|
* @method
|
|
15257
15278
|
* @param {String} fontStyle
|
|
@@ -15413,9 +15434,9 @@
|
|
|
15413
15434
|
'bottom-right': 135,
|
|
15414
15435
|
};
|
|
15415
15436
|
const TOUCH_DEVICE = 'ontouchstart' in Konva$2._global;
|
|
15416
|
-
function getCursor(anchorName, rad) {
|
|
15437
|
+
function getCursor(anchorName, rad, rotateCursor) {
|
|
15417
15438
|
if (anchorName === 'rotater') {
|
|
15418
|
-
return
|
|
15439
|
+
return rotateCursor;
|
|
15419
15440
|
}
|
|
15420
15441
|
rad += Util.degToRad(ANGLES[anchorName] || 0);
|
|
15421
15442
|
var angle = ((Util.radToDeg(rad) % 360) + 360) % 360;
|
|
@@ -15485,8 +15506,12 @@
|
|
|
15485
15506
|
const y = point.y +
|
|
15486
15507
|
(shape.x - point.x) * Math.sin(angleRad) +
|
|
15487
15508
|
(shape.y - point.y) * Math.cos(angleRad);
|
|
15488
|
-
return
|
|
15489
|
-
|
|
15509
|
+
return {
|
|
15510
|
+
...shape,
|
|
15511
|
+
rotation: shape.rotation + angleRad,
|
|
15512
|
+
x,
|
|
15513
|
+
y,
|
|
15514
|
+
};
|
|
15490
15515
|
}
|
|
15491
15516
|
function rotateAroundCenter(shape, deltaRad) {
|
|
15492
15517
|
const center = getCenter(shape);
|
|
@@ -15516,6 +15541,7 @@
|
|
|
15516
15541
|
* @param {Array} [config.rotationSnaps] Array of angles for rotation snaps. Default is []
|
|
15517
15542
|
* @param {Number} [config.rotationSnapTolerance] Snapping tolerance. If closer than this it will snap. Default is 5
|
|
15518
15543
|
* @param {Number} [config.rotateAnchorOffset] Default is 50
|
|
15544
|
+
* @param {String} [config.rotateAnchorCursor] Default is crosshair
|
|
15519
15545
|
* @param {Number} [config.padding] Default is 0
|
|
15520
15546
|
* @param {Boolean} [config.borderEnabled] Should we draw border? Default is true
|
|
15521
15547
|
* @param {String} [config.borderStroke] Border stroke color
|
|
@@ -15547,6 +15573,7 @@
|
|
|
15547
15573
|
constructor(config) {
|
|
15548
15574
|
// call super constructor
|
|
15549
15575
|
super(config);
|
|
15576
|
+
this._movingAnchorName = null;
|
|
15550
15577
|
this._transforming = false;
|
|
15551
15578
|
this._createElements();
|
|
15552
15579
|
// bindings
|
|
@@ -15772,7 +15799,7 @@
|
|
|
15772
15799
|
});
|
|
15773
15800
|
const tr = new Transform();
|
|
15774
15801
|
tr.rotate(-Konva$2.getAngle(this.rotation()));
|
|
15775
|
-
var minX, minY, maxX, maxY;
|
|
15802
|
+
var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
15776
15803
|
totalPoints.forEach(function (point) {
|
|
15777
15804
|
var transformed = tr.point(point);
|
|
15778
15805
|
if (minX === undefined) {
|
|
@@ -15816,9 +15843,9 @@
|
|
|
15816
15843
|
}
|
|
15817
15844
|
_createElements() {
|
|
15818
15845
|
this._createBack();
|
|
15819
|
-
ANCHORS_NAMES.forEach(
|
|
15846
|
+
ANCHORS_NAMES.forEach((name) => {
|
|
15820
15847
|
this._createAnchor(name);
|
|
15821
|
-
}
|
|
15848
|
+
});
|
|
15822
15849
|
this._createAnchor('rotater');
|
|
15823
15850
|
}
|
|
15824
15851
|
_createAnchor(name) {
|
|
@@ -15847,7 +15874,8 @@
|
|
|
15847
15874
|
// add hover styling
|
|
15848
15875
|
anchor.on('mouseenter', () => {
|
|
15849
15876
|
var rad = Konva$2.getAngle(this.rotation());
|
|
15850
|
-
var
|
|
15877
|
+
var rotateCursor = this.rotateAnchorCursor();
|
|
15878
|
+
var cursor = getCursor(name, rad, rotateCursor);
|
|
15851
15879
|
anchor.getStage().content &&
|
|
15852
15880
|
(anchor.getStage().content.style.cursor = cursor);
|
|
15853
15881
|
this._cursorChange = true;
|
|
@@ -15865,16 +15893,16 @@
|
|
|
15865
15893
|
width: 0,
|
|
15866
15894
|
height: 0,
|
|
15867
15895
|
draggable: true,
|
|
15868
|
-
sceneFunc(ctx) {
|
|
15869
|
-
var tr =
|
|
15896
|
+
sceneFunc(ctx, shape) {
|
|
15897
|
+
var tr = shape.getParent();
|
|
15870
15898
|
var padding = tr.padding();
|
|
15871
15899
|
ctx.beginPath();
|
|
15872
|
-
ctx.rect(-padding, -padding,
|
|
15873
|
-
ctx.moveTo(
|
|
15900
|
+
ctx.rect(-padding, -padding, shape.width() + padding * 2, shape.height() + padding * 2);
|
|
15901
|
+
ctx.moveTo(shape.width() / 2, -padding);
|
|
15874
15902
|
if (tr.rotateEnabled()) {
|
|
15875
|
-
ctx.lineTo(
|
|
15903
|
+
ctx.lineTo(shape.width() / 2, -tr.rotateAnchorOffset() * Util._sign(shape.height()) - padding);
|
|
15876
15904
|
}
|
|
15877
|
-
ctx.fillStrokeShape(
|
|
15905
|
+
ctx.fillStrokeShape(shape);
|
|
15878
15906
|
},
|
|
15879
15907
|
hitFunc: (ctx, shape) => {
|
|
15880
15908
|
if (!this.shouldOverdrawWholeArea()) {
|
|
@@ -16564,6 +16592,20 @@
|
|
|
16564
16592
|
* transformer.rotateAnchorOffset(100);
|
|
16565
16593
|
*/
|
|
16566
16594
|
Factory.addGetterSetter(Transformer, 'rotateAnchorOffset', 50, getNumberValidator());
|
|
16595
|
+
/**
|
|
16596
|
+
* get/set rotation anchor cursor
|
|
16597
|
+
* @name Konva.Transformer#rotateAnchorCursor
|
|
16598
|
+
* @method
|
|
16599
|
+
* @param {String} cursorName
|
|
16600
|
+
* @returns {String}
|
|
16601
|
+
* @example
|
|
16602
|
+
* // get
|
|
16603
|
+
* var currentRotationAnchorCursor = transformer.rotateAnchorCursor();
|
|
16604
|
+
*
|
|
16605
|
+
* // set
|
|
16606
|
+
* transformer.rotateAnchorCursor('grab');
|
|
16607
|
+
*/
|
|
16608
|
+
Factory.addGetterSetter(Transformer, 'rotateAnchorCursor', 'crosshair');
|
|
16567
16609
|
/**
|
|
16568
16610
|
* get/set distance for rotation tolerance
|
|
16569
16611
|
* @name Konva.Transformer#rotationSnapTolerance
|
|
@@ -17102,518 +17144,39 @@
|
|
|
17102
17144
|
this.next = null;
|
|
17103
17145
|
}
|
|
17104
17146
|
var mul_table = [
|
|
17105
|
-
512,
|
|
17106
|
-
512,
|
|
17107
|
-
|
|
17108
|
-
|
|
17109
|
-
|
|
17110
|
-
|
|
17111
|
-
|
|
17112
|
-
|
|
17113
|
-
|
|
17114
|
-
|
|
17115
|
-
|
|
17116
|
-
|
|
17117
|
-
|
|
17118
|
-
|
|
17119
|
-
|
|
17120
|
-
|
|
17121
|
-
|
|
17122
|
-
405,
|
|
17123
|
-
364,
|
|
17124
|
-
328,
|
|
17125
|
-
298,
|
|
17126
|
-
271,
|
|
17127
|
-
496,
|
|
17128
|
-
456,
|
|
17129
|
-
420,
|
|
17130
|
-
388,
|
|
17131
|
-
360,
|
|
17132
|
-
335,
|
|
17133
|
-
312,
|
|
17134
|
-
292,
|
|
17135
|
-
273,
|
|
17136
|
-
512,
|
|
17137
|
-
482,
|
|
17138
|
-
454,
|
|
17139
|
-
428,
|
|
17140
|
-
405,
|
|
17141
|
-
383,
|
|
17142
|
-
364,
|
|
17143
|
-
345,
|
|
17144
|
-
328,
|
|
17145
|
-
312,
|
|
17146
|
-
298,
|
|
17147
|
-
284,
|
|
17148
|
-
271,
|
|
17149
|
-
259,
|
|
17150
|
-
496,
|
|
17151
|
-
475,
|
|
17152
|
-
456,
|
|
17153
|
-
437,
|
|
17154
|
-
420,
|
|
17155
|
-
404,
|
|
17156
|
-
388,
|
|
17157
|
-
374,
|
|
17158
|
-
360,
|
|
17159
|
-
347,
|
|
17160
|
-
335,
|
|
17161
|
-
323,
|
|
17162
|
-
312,
|
|
17163
|
-
302,
|
|
17164
|
-
292,
|
|
17165
|
-
282,
|
|
17166
|
-
273,
|
|
17167
|
-
265,
|
|
17168
|
-
512,
|
|
17169
|
-
497,
|
|
17170
|
-
482,
|
|
17171
|
-
468,
|
|
17172
|
-
454,
|
|
17173
|
-
441,
|
|
17174
|
-
428,
|
|
17175
|
-
417,
|
|
17176
|
-
405,
|
|
17177
|
-
394,
|
|
17178
|
-
383,
|
|
17179
|
-
373,
|
|
17180
|
-
364,
|
|
17181
|
-
354,
|
|
17182
|
-
345,
|
|
17183
|
-
337,
|
|
17184
|
-
328,
|
|
17185
|
-
320,
|
|
17186
|
-
312,
|
|
17187
|
-
305,
|
|
17188
|
-
298,
|
|
17189
|
-
291,
|
|
17190
|
-
284,
|
|
17191
|
-
278,
|
|
17192
|
-
271,
|
|
17193
|
-
265,
|
|
17194
|
-
259,
|
|
17195
|
-
507,
|
|
17196
|
-
496,
|
|
17197
|
-
485,
|
|
17198
|
-
475,
|
|
17199
|
-
465,
|
|
17200
|
-
456,
|
|
17201
|
-
446,
|
|
17202
|
-
437,
|
|
17203
|
-
428,
|
|
17204
|
-
420,
|
|
17205
|
-
412,
|
|
17206
|
-
404,
|
|
17207
|
-
396,
|
|
17208
|
-
388,
|
|
17209
|
-
381,
|
|
17210
|
-
374,
|
|
17211
|
-
367,
|
|
17212
|
-
360,
|
|
17213
|
-
354,
|
|
17214
|
-
347,
|
|
17215
|
-
341,
|
|
17216
|
-
335,
|
|
17217
|
-
329,
|
|
17218
|
-
323,
|
|
17219
|
-
318,
|
|
17220
|
-
312,
|
|
17221
|
-
307,
|
|
17222
|
-
302,
|
|
17223
|
-
297,
|
|
17224
|
-
292,
|
|
17225
|
-
287,
|
|
17226
|
-
282,
|
|
17227
|
-
278,
|
|
17228
|
-
273,
|
|
17229
|
-
269,
|
|
17230
|
-
265,
|
|
17231
|
-
261,
|
|
17232
|
-
512,
|
|
17233
|
-
505,
|
|
17234
|
-
497,
|
|
17235
|
-
489,
|
|
17236
|
-
482,
|
|
17237
|
-
475,
|
|
17238
|
-
468,
|
|
17239
|
-
461,
|
|
17240
|
-
454,
|
|
17241
|
-
447,
|
|
17242
|
-
441,
|
|
17243
|
-
435,
|
|
17244
|
-
428,
|
|
17245
|
-
422,
|
|
17246
|
-
417,
|
|
17247
|
-
411,
|
|
17248
|
-
405,
|
|
17249
|
-
399,
|
|
17250
|
-
394,
|
|
17251
|
-
389,
|
|
17252
|
-
383,
|
|
17253
|
-
378,
|
|
17254
|
-
373,
|
|
17255
|
-
368,
|
|
17256
|
-
364,
|
|
17257
|
-
359,
|
|
17258
|
-
354,
|
|
17259
|
-
350,
|
|
17260
|
-
345,
|
|
17261
|
-
341,
|
|
17262
|
-
337,
|
|
17263
|
-
332,
|
|
17264
|
-
328,
|
|
17265
|
-
324,
|
|
17266
|
-
320,
|
|
17267
|
-
316,
|
|
17268
|
-
312,
|
|
17269
|
-
309,
|
|
17270
|
-
305,
|
|
17271
|
-
301,
|
|
17272
|
-
298,
|
|
17273
|
-
294,
|
|
17274
|
-
291,
|
|
17275
|
-
287,
|
|
17276
|
-
284,
|
|
17277
|
-
281,
|
|
17278
|
-
278,
|
|
17279
|
-
274,
|
|
17280
|
-
271,
|
|
17281
|
-
268,
|
|
17282
|
-
265,
|
|
17283
|
-
262,
|
|
17284
|
-
259,
|
|
17285
|
-
257,
|
|
17286
|
-
507,
|
|
17287
|
-
501,
|
|
17288
|
-
496,
|
|
17289
|
-
491,
|
|
17290
|
-
485,
|
|
17291
|
-
480,
|
|
17292
|
-
475,
|
|
17293
|
-
470,
|
|
17294
|
-
465,
|
|
17295
|
-
460,
|
|
17296
|
-
456,
|
|
17297
|
-
451,
|
|
17298
|
-
446,
|
|
17299
|
-
442,
|
|
17300
|
-
437,
|
|
17301
|
-
433,
|
|
17302
|
-
428,
|
|
17303
|
-
424,
|
|
17304
|
-
420,
|
|
17305
|
-
416,
|
|
17306
|
-
412,
|
|
17307
|
-
408,
|
|
17308
|
-
404,
|
|
17309
|
-
400,
|
|
17310
|
-
396,
|
|
17311
|
-
392,
|
|
17312
|
-
388,
|
|
17313
|
-
385,
|
|
17314
|
-
381,
|
|
17315
|
-
377,
|
|
17316
|
-
374,
|
|
17317
|
-
370,
|
|
17318
|
-
367,
|
|
17319
|
-
363,
|
|
17320
|
-
360,
|
|
17321
|
-
357,
|
|
17322
|
-
354,
|
|
17323
|
-
350,
|
|
17324
|
-
347,
|
|
17325
|
-
344,
|
|
17326
|
-
341,
|
|
17327
|
-
338,
|
|
17328
|
-
335,
|
|
17329
|
-
332,
|
|
17330
|
-
329,
|
|
17331
|
-
326,
|
|
17332
|
-
323,
|
|
17333
|
-
320,
|
|
17334
|
-
318,
|
|
17335
|
-
315,
|
|
17336
|
-
312,
|
|
17337
|
-
310,
|
|
17338
|
-
307,
|
|
17339
|
-
304,
|
|
17340
|
-
302,
|
|
17341
|
-
299,
|
|
17342
|
-
297,
|
|
17343
|
-
294,
|
|
17344
|
-
292,
|
|
17345
|
-
289,
|
|
17346
|
-
287,
|
|
17347
|
-
285,
|
|
17348
|
-
282,
|
|
17349
|
-
280,
|
|
17350
|
-
278,
|
|
17351
|
-
275,
|
|
17352
|
-
273,
|
|
17353
|
-
271,
|
|
17354
|
-
269,
|
|
17355
|
-
267,
|
|
17356
|
-
265,
|
|
17357
|
-
263,
|
|
17358
|
-
261,
|
|
17359
|
-
259,
|
|
17147
|
+
512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292,
|
|
17148
|
+
512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292,
|
|
17149
|
+
273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259,
|
|
17150
|
+
496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292,
|
|
17151
|
+
282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373,
|
|
17152
|
+
364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259,
|
|
17153
|
+
507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381,
|
|
17154
|
+
374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292,
|
|
17155
|
+
287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461,
|
|
17156
|
+
454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373,
|
|
17157
|
+
368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309,
|
|
17158
|
+
305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259,
|
|
17159
|
+
257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442,
|
|
17160
|
+
437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381,
|
|
17161
|
+
377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332,
|
|
17162
|
+
329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292,
|
|
17163
|
+
289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259,
|
|
17360
17164
|
];
|
|
17361
17165
|
var shg_table = [
|
|
17362
|
-
9,
|
|
17363
|
-
|
|
17364
|
-
|
|
17365
|
-
|
|
17366
|
-
|
|
17367
|
-
|
|
17368
|
-
|
|
17369
|
-
|
|
17370
|
-
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
|
|
17374
|
-
|
|
17375
|
-
|
|
17376
|
-
16,
|
|
17377
|
-
17,
|
|
17378
|
-
17,
|
|
17379
|
-
17,
|
|
17380
|
-
17,
|
|
17381
|
-
17,
|
|
17382
|
-
17,
|
|
17383
|
-
17,
|
|
17384
|
-
18,
|
|
17385
|
-
18,
|
|
17386
|
-
18,
|
|
17387
|
-
18,
|
|
17388
|
-
18,
|
|
17389
|
-
18,
|
|
17390
|
-
18,
|
|
17391
|
-
18,
|
|
17392
|
-
18,
|
|
17393
|
-
19,
|
|
17394
|
-
19,
|
|
17395
|
-
19,
|
|
17396
|
-
19,
|
|
17397
|
-
19,
|
|
17398
|
-
19,
|
|
17399
|
-
19,
|
|
17400
|
-
19,
|
|
17401
|
-
19,
|
|
17402
|
-
19,
|
|
17403
|
-
19,
|
|
17404
|
-
19,
|
|
17405
|
-
19,
|
|
17406
|
-
19,
|
|
17407
|
-
20,
|
|
17408
|
-
20,
|
|
17409
|
-
20,
|
|
17410
|
-
20,
|
|
17411
|
-
20,
|
|
17412
|
-
20,
|
|
17413
|
-
20,
|
|
17414
|
-
20,
|
|
17415
|
-
20,
|
|
17416
|
-
20,
|
|
17417
|
-
20,
|
|
17418
|
-
20,
|
|
17419
|
-
20,
|
|
17420
|
-
20,
|
|
17421
|
-
20,
|
|
17422
|
-
20,
|
|
17423
|
-
20,
|
|
17424
|
-
20,
|
|
17425
|
-
21,
|
|
17426
|
-
21,
|
|
17427
|
-
21,
|
|
17428
|
-
21,
|
|
17429
|
-
21,
|
|
17430
|
-
21,
|
|
17431
|
-
21,
|
|
17432
|
-
21,
|
|
17433
|
-
21,
|
|
17434
|
-
21,
|
|
17435
|
-
21,
|
|
17436
|
-
21,
|
|
17437
|
-
21,
|
|
17438
|
-
21,
|
|
17439
|
-
21,
|
|
17440
|
-
21,
|
|
17441
|
-
21,
|
|
17442
|
-
21,
|
|
17443
|
-
21,
|
|
17444
|
-
21,
|
|
17445
|
-
21,
|
|
17446
|
-
21,
|
|
17447
|
-
21,
|
|
17448
|
-
21,
|
|
17449
|
-
21,
|
|
17450
|
-
21,
|
|
17451
|
-
21,
|
|
17452
|
-
22,
|
|
17453
|
-
22,
|
|
17454
|
-
22,
|
|
17455
|
-
22,
|
|
17456
|
-
22,
|
|
17457
|
-
22,
|
|
17458
|
-
22,
|
|
17459
|
-
22,
|
|
17460
|
-
22,
|
|
17461
|
-
22,
|
|
17462
|
-
22,
|
|
17463
|
-
22,
|
|
17464
|
-
22,
|
|
17465
|
-
22,
|
|
17466
|
-
22,
|
|
17467
|
-
22,
|
|
17468
|
-
22,
|
|
17469
|
-
22,
|
|
17470
|
-
22,
|
|
17471
|
-
22,
|
|
17472
|
-
22,
|
|
17473
|
-
22,
|
|
17474
|
-
22,
|
|
17475
|
-
22,
|
|
17476
|
-
22,
|
|
17477
|
-
22,
|
|
17478
|
-
22,
|
|
17479
|
-
22,
|
|
17480
|
-
22,
|
|
17481
|
-
22,
|
|
17482
|
-
22,
|
|
17483
|
-
22,
|
|
17484
|
-
22,
|
|
17485
|
-
22,
|
|
17486
|
-
22,
|
|
17487
|
-
22,
|
|
17488
|
-
22,
|
|
17489
|
-
23,
|
|
17490
|
-
23,
|
|
17491
|
-
23,
|
|
17492
|
-
23,
|
|
17493
|
-
23,
|
|
17494
|
-
23,
|
|
17495
|
-
23,
|
|
17496
|
-
23,
|
|
17497
|
-
23,
|
|
17498
|
-
23,
|
|
17499
|
-
23,
|
|
17500
|
-
23,
|
|
17501
|
-
23,
|
|
17502
|
-
23,
|
|
17503
|
-
23,
|
|
17504
|
-
23,
|
|
17505
|
-
23,
|
|
17506
|
-
23,
|
|
17507
|
-
23,
|
|
17508
|
-
23,
|
|
17509
|
-
23,
|
|
17510
|
-
23,
|
|
17511
|
-
23,
|
|
17512
|
-
23,
|
|
17513
|
-
23,
|
|
17514
|
-
23,
|
|
17515
|
-
23,
|
|
17516
|
-
23,
|
|
17517
|
-
23,
|
|
17518
|
-
23,
|
|
17519
|
-
23,
|
|
17520
|
-
23,
|
|
17521
|
-
23,
|
|
17522
|
-
23,
|
|
17523
|
-
23,
|
|
17524
|
-
23,
|
|
17525
|
-
23,
|
|
17526
|
-
23,
|
|
17527
|
-
23,
|
|
17528
|
-
23,
|
|
17529
|
-
23,
|
|
17530
|
-
23,
|
|
17531
|
-
23,
|
|
17532
|
-
23,
|
|
17533
|
-
23,
|
|
17534
|
-
23,
|
|
17535
|
-
23,
|
|
17536
|
-
23,
|
|
17537
|
-
23,
|
|
17538
|
-
23,
|
|
17539
|
-
23,
|
|
17540
|
-
23,
|
|
17541
|
-
23,
|
|
17542
|
-
23,
|
|
17543
|
-
24,
|
|
17544
|
-
24,
|
|
17545
|
-
24,
|
|
17546
|
-
24,
|
|
17547
|
-
24,
|
|
17548
|
-
24,
|
|
17549
|
-
24,
|
|
17550
|
-
24,
|
|
17551
|
-
24,
|
|
17552
|
-
24,
|
|
17553
|
-
24,
|
|
17554
|
-
24,
|
|
17555
|
-
24,
|
|
17556
|
-
24,
|
|
17557
|
-
24,
|
|
17558
|
-
24,
|
|
17559
|
-
24,
|
|
17560
|
-
24,
|
|
17561
|
-
24,
|
|
17562
|
-
24,
|
|
17563
|
-
24,
|
|
17564
|
-
24,
|
|
17565
|
-
24,
|
|
17566
|
-
24,
|
|
17567
|
-
24,
|
|
17568
|
-
24,
|
|
17569
|
-
24,
|
|
17570
|
-
24,
|
|
17571
|
-
24,
|
|
17572
|
-
24,
|
|
17573
|
-
24,
|
|
17574
|
-
24,
|
|
17575
|
-
24,
|
|
17576
|
-
24,
|
|
17577
|
-
24,
|
|
17578
|
-
24,
|
|
17579
|
-
24,
|
|
17580
|
-
24,
|
|
17581
|
-
24,
|
|
17582
|
-
24,
|
|
17583
|
-
24,
|
|
17584
|
-
24,
|
|
17585
|
-
24,
|
|
17586
|
-
24,
|
|
17587
|
-
24,
|
|
17588
|
-
24,
|
|
17589
|
-
24,
|
|
17590
|
-
24,
|
|
17591
|
-
24,
|
|
17592
|
-
24,
|
|
17593
|
-
24,
|
|
17594
|
-
24,
|
|
17595
|
-
24,
|
|
17596
|
-
24,
|
|
17597
|
-
24,
|
|
17598
|
-
24,
|
|
17599
|
-
24,
|
|
17600
|
-
24,
|
|
17601
|
-
24,
|
|
17602
|
-
24,
|
|
17603
|
-
24,
|
|
17604
|
-
24,
|
|
17605
|
-
24,
|
|
17606
|
-
24,
|
|
17607
|
-
24,
|
|
17608
|
-
24,
|
|
17609
|
-
24,
|
|
17610
|
-
24,
|
|
17611
|
-
24,
|
|
17612
|
-
24,
|
|
17613
|
-
24,
|
|
17614
|
-
24,
|
|
17615
|
-
24,
|
|
17616
|
-
24,
|
|
17166
|
+
9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17,
|
|
17167
|
+
17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19,
|
|
17168
|
+
19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
|
|
17169
|
+
20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
|
17170
|
+
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,
|
|
17171
|
+
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
|
|
17172
|
+
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23,
|
|
17173
|
+
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
|
|
17174
|
+
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
|
|
17175
|
+
23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
|
|
17176
|
+
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
|
|
17177
|
+
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
|
|
17178
|
+
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
|
|
17179
|
+
24, 24, 24, 24, 24, 24, 24,
|
|
17617
17180
|
];
|
|
17618
17181
|
function filterGaussBlurRGBA(imageData, radius) {
|
|
17619
17182
|
var pixels = imageData.data, width = imageData.width, height = imageData.height;
|
|
@@ -17628,7 +17191,15 @@
|
|
|
17628
17191
|
stack.next = stackStart;
|
|
17629
17192
|
yw = yi = 0;
|
|
17630
17193
|
for (y = 0; y < height; y++) {
|
|
17631
|
-
r_in_sum =
|
|
17194
|
+
r_in_sum =
|
|
17195
|
+
g_in_sum =
|
|
17196
|
+
b_in_sum =
|
|
17197
|
+
a_in_sum =
|
|
17198
|
+
r_sum =
|
|
17199
|
+
g_sum =
|
|
17200
|
+
b_sum =
|
|
17201
|
+
a_sum =
|
|
17202
|
+
0;
|
|
17632
17203
|
r_out_sum = radiusPlus1 * (pr = pixels[yi]);
|
|
17633
17204
|
g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);
|
|
17634
17205
|
b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);
|
|
@@ -17702,7 +17273,15 @@
|
|
|
17702
17273
|
yw += width;
|
|
17703
17274
|
}
|
|
17704
17275
|
for (x = 0; x < width; x++) {
|
|
17705
|
-
g_in_sum =
|
|
17276
|
+
g_in_sum =
|
|
17277
|
+
b_in_sum =
|
|
17278
|
+
a_in_sum =
|
|
17279
|
+
r_in_sum =
|
|
17280
|
+
g_sum =
|
|
17281
|
+
b_sum =
|
|
17282
|
+
a_sum =
|
|
17283
|
+
r_sum =
|
|
17284
|
+
0;
|
|
17706
17285
|
yi = x << 2;
|
|
17707
17286
|
r_out_sum = radiusPlus1 * (pr = pixels[yi]);
|
|
17708
17287
|
g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);
|