Class: ConvolutionFilter

ConvolutionFilter

ConvolutionFilter クラスを使用すると、マトリックス畳み込みフィルター効果を適用できます。
畳み込みでは、入力イメージ内のピクセルを、隣接するピクセルと組み合わせて、イメージを作成します。
畳み込みを使用すると、ぼかし、エッジ検出、シャープ、エンボス、ベベルなど、幅広いイメージ効果を実現できます。

The ConvolutionFilter class applies a matrix convolution filter effect.
A convolution combines pixels in the input image with neighboring pixels to produce an image.
A wide variety of image effects can be achieved through convolutions, including blurring,
edge detection, sharpening, embossing, and beveling.

new next2d.filters.ConvolutionFilter (matrix_x, matrix_y, matrix, divisor, bias, preserve_alpha, clamp, color, alpha)

NameTypeDefaultDescription
matrix_xnumber0optional
matrix_ynumber0optional
matrixarraynulloptional
divisornumber1.0optional
biasnumber0.0optional
preserve_alphabooleantrueoptional
clampbooleantrueoptional
colornumber0optional
alphanumber0.0optional

Extends

  • BitmapFilter

Members

next2d.filters.ConvolutionFilter.namespace staticconstant

指定されたクラスの空間名を返します。
Returns the space name of the specified class.

Default Value:
  • next2d.filters.ConvolutionFilter

alpha number

アルファ透明度の値です。
The alpha transparency value for the color.

Default Value:
  • 4

bias number

マトリックス変換の結果に加算するバイアス量です。
The amount of bias to add to the result of the matrix transformation.

Default Value:
  • 0

clamp boolean

イメージをクランプする必要があるかどうかを示します。
Indicates whether the image should be clamped.

Default Value:
  • true

color number

ソースイメージの外にあるピクセルを置換する 16 進数のカラー値です。
The hexadecimal color to substitute for pixels that are off the source image.

Default Value:
  • 0

divisor number

マトリックス変換中に使用する除数です。
The divisor used during matrix transformation.

Default Value:
  • 1

matrix array

マトリックス変換に使用する値の配列です。
An array of values used for matrix transformation.

Default Value:
  • null

matrixX number

マトリックスの x 次元 (マトリックスの列数) です。
The x dimension of the matrix (the number of columns in the matrix).

Default Value:
  • 0

matrixY number

マトリックスの y 次元(マトリックスの行数)です。
The y dimension of the matrix (the number of rows in the matrix).

Default Value:
  • 0

namespace constant

指定されたオブジェクトの空間名を返します。
Returns the space name of the specified object.

Default Value:
  • next2d.filters.ConvolutionFilter

preserveAlpha boolean

アルファチャンネルがフィルター効果なしで維持されるかどうか、またはカラーチャンネルだけではなく
アルファチャンネルにも畳み込みフィルターが適用されるかどうかを示します。
Indicates if the alpha channel is preserved without the filter effect or
if the convolution filter is applied to the alpha channel as well as the color channels.

Default Value:
  • true

Methods

next2d.filters.ConvolutionFilter.toString ()string static

指定されたクラスのストリングを返します。
Returns the string representation of the specified class.

Default Value:
  • [class ConvolutionFilter]
Returns:
TypeDescription
string

clone ()ConvolutionFilter

オブジェクトのコピーを返します。
Returns a copy of this filter object.

Returns:
TypeDescription
ConvolutionFilter

toString ()string

指定されたオブジェクトのストリングを返します。
Returns the string representation of the specified object.

Default Value:
  • [object ConvolutionFilter]
Returns:
TypeDescription
string