@next2d/filters 1.18.11 → 2.0.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 (118) hide show
  1. package/package.json +8 -20
  2. package/src/BevelFilter/service/BevelFilterCanApplyFilterService.d.ts +11 -0
  3. package/src/BevelFilter/service/BevelFilterCanApplyFilterService.js +16 -0
  4. package/src/BevelFilter/service/BevelFilterToArrayService.d.ts +11 -0
  5. package/src/BevelFilter/service/BevelFilterToArrayService.js +26 -0
  6. package/src/BevelFilter/service/BevelFilterToNumberArrayService.d.ts +11 -0
  7. package/src/BevelFilter/service/BevelFilterToNumberArrayService.js +27 -0
  8. package/src/BevelFilter/usecase/BevelFilterGetBoundsUseCase.d.ts +10 -0
  9. package/src/BevelFilter/usecase/BevelFilterGetBoundsUseCase.js +29 -0
  10. package/{dist → src}/BevelFilter.d.ts +117 -84
  11. package/src/BevelFilter.js +513 -0
  12. package/src/BitmapFilter.d.ts +50 -0
  13. package/src/BitmapFilter.js +61 -0
  14. package/src/BlurFilter/service/BlurFilterCanApplyFilterService.d.ts +16 -0
  15. package/src/BlurFilter/service/BlurFilterCanApplyFilterService.js +12 -0
  16. package/src/BlurFilter/service/BlurFilterToArrayService.d.ts +11 -0
  17. package/src/BlurFilter/service/BlurFilterToArrayService.js +17 -0
  18. package/src/BlurFilter/service/BlurFilterToNumberArrayService.d.ts +11 -0
  19. package/src/BlurFilter/service/BlurFilterToNumberArrayService.js +17 -0
  20. package/src/BlurFilter/usecase/BlurFilterGetBoundsUseCase.d.ts +17 -0
  21. package/src/BlurFilter/usecase/BlurFilterGetBoundsUseCase.js +29 -0
  22. package/src/BlurFilter.d.ts +142 -0
  23. package/src/BlurFilter.js +213 -0
  24. package/src/ColorMatrixFilter/service/ColorMatrixFilterToArrayService.d.ts +11 -0
  25. package/src/ColorMatrixFilter/service/ColorMatrixFilterToArrayService.js +15 -0
  26. package/src/ColorMatrixFilter/service/ColorMatrixFilterToNumberArrayService.d.ts +11 -0
  27. package/src/ColorMatrixFilter/service/ColorMatrixFilterToNumberArrayService.js +15 -0
  28. package/src/ColorMatrixFilter.d.ts +78 -0
  29. package/src/ColorMatrixFilter.js +129 -0
  30. package/src/ConvolutionFilter/service/ConvolutionFilterCanApplyFilterService.d.ts +11 -0
  31. package/src/ConvolutionFilter/service/ConvolutionFilterCanApplyFilterService.js +13 -0
  32. package/src/ConvolutionFilter/service/ConvolutionFilterToArrayService.d.ts +11 -0
  33. package/src/ConvolutionFilter/service/ConvolutionFilterToArrayService.js +23 -0
  34. package/src/ConvolutionFilter/service/ConvolutionFilterToNumberArrayService.d.ts +11 -0
  35. package/src/ConvolutionFilter/service/ConvolutionFilterToNumberArrayService.js +24 -0
  36. package/{dist → src}/ConvolutionFilter.d.ts +75 -63
  37. package/{dist → src}/ConvolutionFilter.js +148 -126
  38. package/src/DisplacementMapFilter/service/DisplacementMapFilterCanApplyFilterService.d.ts +11 -0
  39. package/src/DisplacementMapFilter/service/DisplacementMapFilterCanApplyFilterService.js +16 -0
  40. package/src/DisplacementMapFilter/service/DisplacementMapFilterToArrayService.d.ts +11 -0
  41. package/src/DisplacementMapFilter/service/DisplacementMapFilterToArrayService.js +28 -0
  42. package/src/DisplacementMapFilter/service/DisplacementMapFilterToNumberArrayService.d.ts +11 -0
  43. package/src/DisplacementMapFilter/service/DisplacementMapFilterToNumberArrayService.js +36 -0
  44. package/src/DisplacementMapFilter.d.ts +274 -0
  45. package/src/DisplacementMapFilter.js +481 -0
  46. package/src/DropShadowFilter/service/DropShadowFilterCanApplyFilterService.d.ts +11 -0
  47. package/src/DropShadowFilter/service/DropShadowFilterCanApplyFilterService.js +16 -0
  48. package/src/DropShadowFilter/service/DropShadowFilterToArrayService.d.ts +11 -0
  49. package/src/DropShadowFilter/service/DropShadowFilterToArrayService.js +25 -0
  50. package/src/DropShadowFilter/service/DropShadowFilterToNumberArrayService.d.ts +11 -0
  51. package/src/DropShadowFilter/service/DropShadowFilterToNumberArrayService.js +25 -0
  52. package/src/DropShadowFilter/usecase/DropShadowFilterGetBoundsUseCase.d.ts +10 -0
  53. package/src/DropShadowFilter/usecase/DropShadowFilterGetBoundsUseCase.js +33 -0
  54. package/{dist → src}/DropShadowFilter.d.ts +98 -73
  55. package/src/DropShadowFilter.js +466 -0
  56. package/src/FilterUtil.d.ts +36 -0
  57. package/src/FilterUtil.js +60 -0
  58. package/src/GlowFilter/service/GlowFilterCanApplyFilterService.d.ts +11 -0
  59. package/src/GlowFilter/service/GlowFilterCanApplyFilterService.js +16 -0
  60. package/src/GlowFilter/service/GlowFilterToArrayService.d.ts +11 -0
  61. package/src/GlowFilter/service/GlowFilterToArrayService.js +22 -0
  62. package/src/GlowFilter/service/GlowFilterToNumberArrayService.d.ts +11 -0
  63. package/src/GlowFilter/service/GlowFilterToNumberArrayService.js +22 -0
  64. package/src/GlowFilter/usecase/GlowFilterGetBoundsUseCase.d.ts +10 -0
  65. package/src/GlowFilter/usecase/GlowFilterGetBoundsUseCase.js +19 -0
  66. package/{dist → src}/GlowFilter.d.ts +84 -74
  67. package/src/GlowFilter.js +367 -0
  68. package/src/GradientBevelFilter/service/GradientBevelFilterCanApplyFilterService.d.ts +11 -0
  69. package/src/GradientBevelFilter/service/GradientBevelFilterCanApplyFilterService.js +19 -0
  70. package/src/GradientBevelFilter/service/GradientBevelFilterToArrayService.d.ts +11 -0
  71. package/src/GradientBevelFilter/service/GradientBevelFilterToArrayService.js +25 -0
  72. package/src/GradientBevelFilter/service/GradientBevelFilterToNumberArrayService.d.ts +11 -0
  73. package/src/GradientBevelFilter/service/GradientBevelFilterToNumberArrayService.js +29 -0
  74. package/src/GradientBevelFilter/usecase/GradientBevelFilterGetBoundsUseCase.d.ts +10 -0
  75. package/src/GradientBevelFilter/usecase/GradientBevelFilterGetBoundsUseCase.js +29 -0
  76. package/{dist → src}/GradientBevelFilter.d.ts +102 -77
  77. package/src/GradientBevelFilter.js +482 -0
  78. package/src/GradientGlowFilter/service/GradientGlowFilterCanApplyFilterService.d.ts +11 -0
  79. package/src/GradientGlowFilter/service/GradientGlowFilterCanApplyFilterService.js +19 -0
  80. package/src/GradientGlowFilter/service/GradientGlowFilterToArrayService.d.ts +11 -0
  81. package/src/GradientGlowFilter/service/GradientGlowFilterToArrayService.js +25 -0
  82. package/src/GradientGlowFilter/service/GradientGlowFilterToNumberArrayService.d.ts +11 -0
  83. package/src/GradientGlowFilter/service/GradientGlowFilterToNumberArrayService.js +29 -0
  84. package/src/GradientGlowFilter/usecase/GradientGlowFilterGetBoundsUseCase.d.ts +10 -0
  85. package/src/GradientGlowFilter/usecase/GradientGlowFilterGetBoundsUseCase.js +19 -0
  86. package/{dist → src}/GradientGlowFilter.d.ts +102 -78
  87. package/src/GradientGlowFilter.js +480 -0
  88. package/src/interface/IBitmapDataChannel.d.ts +1 -0
  89. package/src/interface/IBitmapFilterType.d.ts +1 -0
  90. package/{dist/interface/BoundsImpl.d.ts → src/interface/IBounds.d.ts} +1 -1
  91. package/src/interface/IDisplacementMapFilterMode.d.ts +1 -0
  92. package/src/interface/IFilterQuality.d.ts +1 -0
  93. package/dist/BevelFilter.js +0 -504
  94. package/dist/BitmapFilter.d.ts +0 -75
  95. package/dist/BitmapFilter.js +0 -95
  96. package/dist/BlurFilter.d.ts +0 -150
  97. package/dist/BlurFilter.js +0 -375
  98. package/dist/ColorMatrixFilter.d.ts +0 -116
  99. package/dist/ColorMatrixFilter.js +0 -179
  100. package/dist/DisplacementMapFilter.d.ts +0 -211
  101. package/dist/DisplacementMapFilter.js +0 -368
  102. package/dist/DropShadowFilter.js +0 -475
  103. package/dist/GlowFilter.js +0 -356
  104. package/dist/GradientBevelFilter.js +0 -490
  105. package/dist/GradientGlowFilter.js +0 -480
  106. package/dist/interface/AttachmentImpl.d.ts +0 -11
  107. package/dist/interface/BitmapDataChannelImpl.d.ts +0 -1
  108. package/dist/interface/BitmapFilterTypeImpl.d.ts +0 -1
  109. package/dist/interface/DisplacementMapFilterModeImpl.d.ts +0 -1
  110. package/dist/interface/FilterQualityImpl.d.ts +0 -1
  111. package/dist/interface/FilterQualityImpl.js +0 -1
  112. /package/{dist → src}/index.d.ts +0 -0
  113. /package/{dist → src}/index.js +0 -0
  114. /package/{dist/interface/AttachmentImpl.js → src/interface/IBitmapDataChannel.js} +0 -0
  115. /package/{dist/interface/BitmapDataChannelImpl.js → src/interface/IBitmapFilterType.js} +0 -0
  116. /package/{dist/interface/BitmapFilterTypeImpl.js → src/interface/IBounds.js} +0 -0
  117. /package/{dist/interface/BoundsImpl.js → src/interface/IDisplacementMapFilterMode.js} +0 -0
  118. /package/{dist/interface/DisplacementMapFilterModeImpl.js → src/interface/IFilterQuality.js} +0 -0
@@ -0,0 +1,482 @@
1
+ import { BitmapFilter } from "./BitmapFilter";
2
+ import { execute as gradientBevelFilterCanApplyFilterService } from "./GradientBevelFilter/service/GradientBevelFilterCanApplyFilterService";
3
+ import { execute as gradientBevelFilterToArrayService } from "./GradientBevelFilter/service/GradientBevelFilterToArrayService";
4
+ import { execute as gradientBevelFilterToNumberArrayService } from "./GradientBevelFilter/service/GradientBevelFilterToNumberArrayService";
5
+ import { execute as gradientBevelFilterGetBoundsUseCase } from "./GradientBevelFilter/usecase/GradientBevelFilterGetBoundsUseCase";
6
+ import { $clamp, $convertColorStringToNumber } from "./FilterUtil";
7
+ /**
8
+ * @description GradientBevelFilter クラスを使用すると、オブジェクトにグラデーションベベル効果を適用し、表示できます。
9
+ * グラデーションベベルは、オブジェクトの外側、内側、または上側が斜めになったエッジであり、グラデーションカラーで強調されます。
10
+ * 斜めのエッジによってオブジェクトが 3 次元に見えます。
11
+ *
12
+ * The GradientBevelFilter class lets you apply a gradient bevel effect to display objects.
13
+ * A gradient bevel is a beveled edge, enhanced with gradient color,
14
+ * on the outside, inside, or top of an object.
15
+ * Beveled edges make objects look three-dimensional.
16
+ *
17
+ * @class
18
+ * @memberOf next2d.filters
19
+ * @extends BitmapFilter
20
+ */
21
+ export class GradientBevelFilter extends BitmapFilter {
22
+ /**
23
+ * @param {number} [distance=4.0]
24
+ * @param {number} [angle=45]
25
+ * @param {array} [colors=null]
26
+ * @param {array} [alphas=null]
27
+ * @param {array} [ratios=null]
28
+ * @param {number} [blur_x=4.0]
29
+ * @param {number} [blur_y=4.0]
30
+ * @param {number} [strength=1]
31
+ * @param {number} [quality=1]
32
+ * @param {string} [type=BitmapFilterType.INNER]
33
+ * @param {boolean} [knockout=false]
34
+ *
35
+ * @constructor
36
+ * @public
37
+ */
38
+ constructor(distance = 4, angle = 45, colors = null, alphas = null, ratios = null, blur_x = 4, blur_y = 4, strength = 1, quality = 1, type = "inner", knockout = false) {
39
+ super();
40
+ /**
41
+ * @description フィルター認識番号
42
+ * Filter Recognition Number
43
+ *
44
+ * @member {number}
45
+ * @public
46
+ */
47
+ Object.defineProperty(this, "$filterType", {
48
+ enumerable: true,
49
+ configurable: true,
50
+ writable: true,
51
+ value: 7
52
+ });
53
+ /**
54
+ * @type {number}
55
+ * @default 4
56
+ * @private
57
+ */
58
+ Object.defineProperty(this, "_$blurX", {
59
+ enumerable: true,
60
+ configurable: true,
61
+ writable: true,
62
+ value: void 0
63
+ });
64
+ /**
65
+ * @type {number}
66
+ * @default 4
67
+ * @private
68
+ */
69
+ Object.defineProperty(this, "_$blurY", {
70
+ enumerable: true,
71
+ configurable: true,
72
+ writable: true,
73
+ value: void 0
74
+ });
75
+ /**
76
+ * @type {IFilterQuality}
77
+ * @default 1
78
+ * @private
79
+ */
80
+ Object.defineProperty(this, "_$quality", {
81
+ enumerable: true,
82
+ configurable: true,
83
+ writable: true,
84
+ value: void 0
85
+ });
86
+ /**
87
+ * @type {number}
88
+ * @default 4
89
+ * @private
90
+ */
91
+ Object.defineProperty(this, "_$distance", {
92
+ enumerable: true,
93
+ configurable: true,
94
+ writable: true,
95
+ value: void 0
96
+ });
97
+ /**
98
+ * @type {number}
99
+ * @default 45
100
+ * @private
101
+ */
102
+ Object.defineProperty(this, "_$angle", {
103
+ enumerable: true,
104
+ configurable: true,
105
+ writable: true,
106
+ value: void 0
107
+ });
108
+ /**
109
+ * @type {array}
110
+ * @default null
111
+ * @private
112
+ */
113
+ Object.defineProperty(this, "_$colors", {
114
+ enumerable: true,
115
+ configurable: true,
116
+ writable: true,
117
+ value: void 0
118
+ });
119
+ /**
120
+ * @type {array}
121
+ * @default null
122
+ * @private
123
+ */
124
+ Object.defineProperty(this, "_$alphas", {
125
+ enumerable: true,
126
+ configurable: true,
127
+ writable: true,
128
+ value: void 0
129
+ });
130
+ /**
131
+ * @type {array}
132
+ * @default null
133
+ * @private
134
+ */
135
+ Object.defineProperty(this, "_$ratios", {
136
+ enumerable: true,
137
+ configurable: true,
138
+ writable: true,
139
+ value: void 0
140
+ });
141
+ /**
142
+ * @type {number}
143
+ * @default 1
144
+ * @private
145
+ */
146
+ Object.defineProperty(this, "_$strength", {
147
+ enumerable: true,
148
+ configurable: true,
149
+ writable: true,
150
+ value: void 0
151
+ });
152
+ /**
153
+ * @type {string}
154
+ * @default "inner"
155
+ * @private
156
+ */
157
+ Object.defineProperty(this, "_$type", {
158
+ enumerable: true,
159
+ configurable: true,
160
+ writable: true,
161
+ value: void 0
162
+ });
163
+ /**
164
+ * @type {boolean}
165
+ * @default false
166
+ * @private
167
+ */
168
+ Object.defineProperty(this, "_$knockout", {
169
+ enumerable: true,
170
+ configurable: true,
171
+ writable: true,
172
+ value: void 0
173
+ });
174
+ // default
175
+ this._$blurX = 4;
176
+ this._$blurY = 4;
177
+ this._$quality = 1;
178
+ this._$distance = 4;
179
+ this._$angle = 45;
180
+ this._$colors = null;
181
+ this._$alphas = null;
182
+ this._$ratios = null;
183
+ this._$strength = 1;
184
+ this._$type = "inner";
185
+ this._$knockout = false;
186
+ // setup
187
+ this.blurX = blur_x;
188
+ this.blurY = blur_y;
189
+ this.quality = quality;
190
+ this.distance = distance;
191
+ this.angle = angle;
192
+ this.colors = colors;
193
+ this.alphas = alphas;
194
+ this.ratios = ratios;
195
+ this.strength = strength;
196
+ this.type = type;
197
+ this.knockout = knockout;
198
+ }
199
+ /**
200
+ * @description カラー配列内の各色に対応するアルファ透明度の値の配列です。
201
+ * An array of alpha transparency values
202
+ * for the corresponding colors in the colors array.
203
+ *
204
+ * @member {array}
205
+ * @default null
206
+ * @public
207
+ */
208
+ get alphas() {
209
+ return this._$alphas;
210
+ }
211
+ set alphas(alphas) {
212
+ if (alphas === this._$alphas) {
213
+ return;
214
+ }
215
+ if (Array.isArray(alphas)) {
216
+ for (let idx = 0; idx < alphas.length; ++idx) {
217
+ const alpha = alphas[idx];
218
+ alphas[idx] = $clamp(+alpha, 0, 1, 0);
219
+ }
220
+ }
221
+ this._$alphas = alphas;
222
+ this.$updated = true;
223
+ }
224
+ /**
225
+ * @description シャドウの角度
226
+ * The angle of the shadow.
227
+ *
228
+ * @member {number}
229
+ * @default 45
230
+ * @public
231
+ */
232
+ get angle() {
233
+ return this._$angle;
234
+ }
235
+ set angle(angle) {
236
+ angle = $clamp(angle % 360, -360, 360, 45);
237
+ if (angle === this._$angle) {
238
+ return;
239
+ }
240
+ this._$angle = angle;
241
+ this.$updated = true;
242
+ }
243
+ /**
244
+ * @description 水平方向のぼかし量。
245
+ * The amount of horizontal blur.
246
+ *
247
+ * @member {number}
248
+ * @default 4
249
+ * @public
250
+ */
251
+ get blurX() {
252
+ return this._$blurX;
253
+ }
254
+ set blurX(blur_x) {
255
+ blur_x = $clamp(+blur_x, 0, 255, 0);
256
+ if (blur_x === this._$blurX) {
257
+ return;
258
+ }
259
+ this._$blurX = blur_x;
260
+ this.$updated = true;
261
+ }
262
+ /**
263
+ * @description 垂直方向のぼかし量。
264
+ * The amount of vertical blur.
265
+ *
266
+ * @member {number}
267
+ * @default 4
268
+ * @public
269
+ */
270
+ get blurY() {
271
+ return this._$blurY;
272
+ }
273
+ set blurY(blur_y) {
274
+ blur_y = $clamp(+blur_y, 0, 255, 0);
275
+ if (blur_y === this._$blurY) {
276
+ return;
277
+ }
278
+ this._$blurY = blur_y;
279
+ this.$updated = true;
280
+ }
281
+ /**
282
+ * @description グラデーションで使用する RGB 16 進数カラー値の配列です。
283
+ * An array of RGB hexadecimal color values to use in the gradient.
284
+ *
285
+ * @member {array}
286
+ * @default null
287
+ * @public
288
+ */
289
+ get colors() {
290
+ return this._$colors;
291
+ }
292
+ set colors(colors) {
293
+ if (this._$colors === colors) {
294
+ return;
295
+ }
296
+ if (Array.isArray(colors)) {
297
+ for (let idx = 0; idx < colors.length; ++idx) {
298
+ const color = colors[idx];
299
+ colors[idx] = $clamp(typeof color === "string"
300
+ ? $convertColorStringToNumber(color)
301
+ : color, 0, 0xffffff, 0);
302
+ }
303
+ }
304
+ this._$colors = colors;
305
+ this.$updated = true;
306
+ }
307
+ /**
308
+ * @description シャドウのオフセット距離です。
309
+ * The offset distance for the shadow, in pixels.
310
+ *
311
+ * @member {number}
312
+ * @default 4
313
+ * @public
314
+ */
315
+ get distance() {
316
+ return this._$distance;
317
+ }
318
+ set distance(distance) {
319
+ distance = $clamp(+distance, -255, 255, 4);
320
+ if (distance === this._$distance) {
321
+ return;
322
+ }
323
+ this._$distance = distance;
324
+ this.$updated = true;
325
+ }
326
+ /**
327
+ * @description オブジェクトにノックアウト効果を適用するかどうか
328
+ * Specifies whether the object has a knockout effect.
329
+ *
330
+ * @member {boolean}
331
+ * @default false
332
+ * @public
333
+ */
334
+ get knockout() {
335
+ return this._$knockout;
336
+ }
337
+ set knockout(knockout) {
338
+ knockout = !!knockout;
339
+ if (knockout === this._$knockout) {
340
+ return;
341
+ }
342
+ this._$knockout = knockout;
343
+ this.$updated = true;
344
+ }
345
+ /**
346
+ * @description ぼかしの実行回数です。
347
+ * The number of times to perform the blur.
348
+ *
349
+ * @member {number}
350
+ * @default 1
351
+ * @public
352
+ */
353
+ get quality() {
354
+ return this._$quality;
355
+ }
356
+ set quality(quality) {
357
+ quality = $clamp(quality | 0, 0, 15, 1);
358
+ if (quality === this._$quality) {
359
+ return;
360
+ }
361
+ this._$quality = quality;
362
+ this.$updated = true;
363
+ }
364
+ /**
365
+ * @description カラー配列内の対応するカラーの色分布比率の配列です。
366
+ * An array of color distribution ratios
367
+ * for the corresponding colors in the colors array.
368
+ *
369
+ * @member {array}
370
+ * @default null
371
+ * @public
372
+ */
373
+ get ratios() {
374
+ return this._$ratios;
375
+ }
376
+ set ratios(ratios) {
377
+ if (this._$ratios === ratios) {
378
+ return;
379
+ }
380
+ if (Array.isArray(ratios)) {
381
+ for (let idx = 0; idx < ratios.length; ++idx) {
382
+ const ratio = ratios[idx];
383
+ ratios[idx] = $clamp(+ratio, 0, 255, 0);
384
+ }
385
+ }
386
+ this._$ratios = ratios;
387
+ this.$updated = true;
388
+ }
389
+ /**
390
+ * @description インプリントの強さまたは広がりです。
391
+ * The strength of the imprint or spread.
392
+ *
393
+ * @member {number}
394
+ * @default 1
395
+ * @public
396
+ */
397
+ get strength() {
398
+ return this._$strength;
399
+ }
400
+ set strength(strength) {
401
+ strength = $clamp(strength | 0, 0, 255, 0);
402
+ if (strength === this._$strength) {
403
+ return;
404
+ }
405
+ this._$strength = strength;
406
+ this.$updated = true;
407
+ }
408
+ /**
409
+ * @description オブジェクトでのベベルの配置
410
+ * The placement of the bevel on the object.
411
+ *
412
+ * @member {string}
413
+ * @default BitmapFilterType.INNER
414
+ * @public
415
+ */
416
+ get type() {
417
+ return this._$type;
418
+ }
419
+ set type(type) {
420
+ if (type === this._$type) {
421
+ return;
422
+ }
423
+ this._$type = type;
424
+ this.$updated = true;
425
+ }
426
+ /**
427
+ * @description オブジェクトのコピーを返します。
428
+ * Returns a copy of this filter object.
429
+ *
430
+ * @return {GradientBevelFilter}
431
+ * @method
432
+ * @public
433
+ */
434
+ clone() {
435
+ return new GradientBevelFilter(this._$distance, this._$angle, this._$colors ? this._$colors.slice() : null, this._$alphas ? this._$alphas.slice() : null, this._$ratios ? this._$ratios.slice() : null, this._$blurX, this._$blurY, this._$strength, this._$quality, this._$type, this._$knockout);
436
+ }
437
+ /**
438
+ * @description 設定されたフィルターの値を配列で返します。
439
+ * Returns the value of the specified filter as an array.
440
+ *
441
+ * @return {array}
442
+ * @method
443
+ * @public
444
+ */
445
+ toArray() {
446
+ return gradientBevelFilterToArrayService(this);
447
+ }
448
+ /**
449
+ * @description 設定されたフィルターの値を数値配列で返します。
450
+ * Returns the value of the specified filter as a number array.
451
+ *
452
+ * @return {Float32Array}
453
+ * @method
454
+ * @public
455
+ */
456
+ toNumberArray() {
457
+ return gradientBevelFilterToNumberArrayService(this);
458
+ }
459
+ /**
460
+ * @description フィルターを適用できるかどうかを返します。
461
+ * Returns whether the filter can be applied.
462
+ *
463
+ * @return {boolean}
464
+ * @method
465
+ * @public
466
+ */
467
+ canApplyFilter() {
468
+ return gradientBevelFilterCanApplyFilterService(this);
469
+ }
470
+ /**
471
+ * @description フィルターの描画範囲のバウンディングボックスを返します。
472
+ * Returns the bounding box of the filter drawing area.
473
+ *
474
+ * @param {Float32Array} bounds
475
+ * @return {Float32Array}
476
+ * @method
477
+ * @public
478
+ */
479
+ getBounds(bounds) {
480
+ return gradientBevelFilterGetBoundsUseCase(this, bounds);
481
+ }
482
+ }
@@ -0,0 +1,11 @@
1
+ import type { GradientGlowFilter } from "../../GradientGlowFilter";
2
+ /**
3
+ * @description フィルターを適用できるかどうかを返します。
4
+ * Returns whether the filter can be applied.
5
+ *
6
+ * @param {GradientGlowFilter} gradient_glow_filter
7
+ * @return {boolean}
8
+ * @method
9
+ * @private
10
+ */
11
+ export declare const execute: (gradient_glow_filter: GradientGlowFilter) => boolean;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @description フィルターを適用できるかどうかを返します。
3
+ * Returns whether the filter can be applied.
4
+ *
5
+ * @param {GradientGlowFilter} gradient_glow_filter
6
+ * @return {boolean}
7
+ * @method
8
+ * @private
9
+ */
10
+ export const execute = (gradient_glow_filter) => {
11
+ return gradient_glow_filter.strength > 0
12
+ && gradient_glow_filter.distance > 0
13
+ && gradient_glow_filter.alphas !== null
14
+ && gradient_glow_filter.ratios !== null
15
+ && gradient_glow_filter.colors !== null
16
+ && gradient_glow_filter.blurX > 0
17
+ && gradient_glow_filter.blurY > 0
18
+ && gradient_glow_filter.quality > 0;
19
+ };
@@ -0,0 +1,11 @@
1
+ import type { GradientGlowFilter } from "../../GradientGlowFilter";
2
+ /**
3
+ * @description フィルターの設定値を配列で返却します。
4
+ * Returns an array of filter settings.
5
+ *
6
+ * @param {GradientGlowFilter} gradient_glow_filter
7
+ * @return {Array<number | boolean | number[] | null | boolean | string>}
8
+ * @method
9
+ * @protected
10
+ */
11
+ export declare const execute: (gradient_glow_filter: GradientGlowFilter) => Array<number | boolean | number[] | null | boolean | string>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @description フィルターの設定値を配列で返却します。
3
+ * Returns an array of filter settings.
4
+ *
5
+ * @param {GradientGlowFilter} gradient_glow_filter
6
+ * @return {Array<number | boolean | number[] | null | boolean | string>}
7
+ * @method
8
+ * @protected
9
+ */
10
+ export const execute = (gradient_glow_filter) => {
11
+ return [
12
+ gradient_glow_filter.$filterType,
13
+ gradient_glow_filter.distance,
14
+ gradient_glow_filter.angle,
15
+ gradient_glow_filter.colors,
16
+ gradient_glow_filter.alphas,
17
+ gradient_glow_filter.ratios,
18
+ gradient_glow_filter.blurX,
19
+ gradient_glow_filter.blurY,
20
+ gradient_glow_filter.strength,
21
+ gradient_glow_filter.quality,
22
+ gradient_glow_filter.type,
23
+ gradient_glow_filter.knockout
24
+ ];
25
+ };
@@ -0,0 +1,11 @@
1
+ import type { GradientGlowFilter } from "../../GradientGlowFilter";
2
+ /**
3
+ * @description フィルターの設定値を数値配列で返却します。
4
+ * Returns a numeric array of filter settings.
5
+ *
6
+ * @param {GradientGlowFilter} gradient_glow_filter
7
+ * @return {Float32Array}
8
+ * @method
9
+ * @protected
10
+ */
11
+ export declare const execute: (gradient_glow_filter: GradientGlowFilter) => Float32Array;
@@ -0,0 +1,29 @@
1
+ import { $typeToNumber } from "../../FilterUtil";
2
+ /**
3
+ * @description フィルターの設定値を数値配列で返却します。
4
+ * Returns a numeric array of filter settings.
5
+ *
6
+ * @param {GradientGlowFilter} gradient_glow_filter
7
+ * @return {Float32Array}
8
+ * @method
9
+ * @protected
10
+ */
11
+ export const execute = (gradient_glow_filter) => {
12
+ const colors = gradient_glow_filter.colors ? gradient_glow_filter.colors : [];
13
+ const alphas = gradient_glow_filter.alphas ? gradient_glow_filter.alphas : [];
14
+ const ratios = gradient_glow_filter.ratios ? gradient_glow_filter.ratios : [];
15
+ return new Float32Array([
16
+ gradient_glow_filter.$filterType,
17
+ gradient_glow_filter.distance,
18
+ gradient_glow_filter.angle,
19
+ colors.length, ...colors,
20
+ alphas.length, ...alphas,
21
+ ratios.length, ...ratios,
22
+ gradient_glow_filter.blurX,
23
+ gradient_glow_filter.blurY,
24
+ gradient_glow_filter.strength,
25
+ gradient_glow_filter.quality,
26
+ $typeToNumber(gradient_glow_filter.type),
27
+ +gradient_glow_filter.knockout
28
+ ]);
29
+ };
@@ -0,0 +1,10 @@
1
+ import type { GradientGlowFilter } from "../../GradientGlowFilter";
2
+ /**
3
+ * @description Filterの描画後の描画範囲を返却
4
+ * Returns the drawing range after drawing Filter
5
+ *
6
+ * @param {GradientGlowFilter} gradient_glow_filter
7
+ * @param {Float32Array} bounds
8
+ * @return {Float32Array}
9
+ */
10
+ export declare const execute: (gradient_glow_filter: GradientGlowFilter, bounds: Float32Array) => Float32Array;
@@ -0,0 +1,19 @@
1
+ import { execute as gradientGlowFilterCanApplyFilterService } from "../service/GradientGlowFilterCanApplyFilterService";
2
+ import { execute as blurFilterGetBoundsUseCase } from "../../BlurFilter/usecase/BlurFilterGetBoundsUseCase";
3
+ /**
4
+ * @description Filterの描画後の描画範囲を返却
5
+ * Returns the drawing range after drawing Filter
6
+ *
7
+ * @param {GradientGlowFilter} gradient_glow_filter
8
+ * @param {Float32Array} bounds
9
+ * @return {Float32Array}
10
+ */
11
+ export const execute = (gradient_glow_filter, bounds) => {
12
+ if (!gradientGlowFilterCanApplyFilterService(gradient_glow_filter)) {
13
+ return bounds;
14
+ }
15
+ if (gradient_glow_filter.type === "inner") {
16
+ return bounds;
17
+ }
18
+ return blurFilterGetBoundsUseCase(gradient_glow_filter, bounds);
19
+ };