VectSharp
2.2.1
A light library for C# vector graphics
|
Represents a filter that applies a matrix convolution to the image. More...
Public Member Functions | |
ConvolutionFilter (double[,] kernel, double scale, bool preserveAlpha=true, double normalisation=1, double bias=0) | |
Creates a new ConvolutionFilter with the specified parameters. More... | |
virtual RasterImage | Filter (RasterImage image, double scale) |
Applies the filter to a RasterImage. | |
Properties | |
Point | TopLeftMargin [get] |
Point | BottomRightMargin [get] |
virtual double[,] | Kernel [get] |
The kernel of the ConvolutionFilter. The dimensions of this matrix should all be odd numbers. The larger the kernel, the worse the performance. More... | |
virtual double | Normalisation = 1 [get] |
The normalisation value that is applies to the kernel. More... | |
virtual double | Bias = 0 [get] |
The bias value that is added to every colour component when the filter is applied. More... | |
virtual double | Scale [get] |
The scale relating the size of the kernel to graphics units. More... | |
virtual bool | PreserveAlpha = true [get] |
If this is true , the alpha value of the input pixels is preserved. Otherwise, the alpha channel is subject to the same convolution process as the other colour components. More... | |
![]() | |
Point | TopLeftMargin [get] |
Determines how much the area of the filter's subject should be expanded on the top-left to accommodate the results of the filter. More... | |
Point | BottomRightMargin [get] |
Determines how much the area of the filter's subject should be expanded on the bottom-right to accommodate the results of the filter. More... | |
Represents a filter that applies a matrix convolution to the image.
Definition at line 26 of file ConvolutionFilter.cs.
VectSharp.Filters.ConvolutionFilter.ConvolutionFilter | ( | double | kernel[,], |
double | scale, | ||
bool | preserveAlpha = true , |
||
double | normalisation = 1 , |
||
double | bias = 0 |
||
) |
Creates a new ConvolutionFilter with the specified parameters.
kernel | The kernel of the ConvolutionFilter. The dimensions of this matrix should all be odd numbers. The larger the kernel, the worse the performance. |
scale | The scale relating the size of the kernel to graphics units. |
preserveAlpha | If this is true , the alpha value of the input pixels is preserved. Otherwise, the alpha channel is subject to the same convolution process as the other colour components. |
normalisation | The normalisation value that is applies to the kernel. |
bias | The bias value that is added to every colour component when the filter is applied. |
ArgumentException | This exception is thrown when the kernel dimensions are not odd numbers. |
Definition at line 67 of file ConvolutionFilter.cs.
|
get |
The bias value that is added to every colour component when the filter is applied.
Definition at line 46 of file ConvolutionFilter.cs.
|
get |
The kernel of the ConvolutionFilter. The dimensions of this matrix should all be odd numbers. The larger the kernel, the worse the performance.
Definition at line 36 of file ConvolutionFilter.cs.
|
get |
The normalisation value that is applies to the kernel.
Definition at line 41 of file ConvolutionFilter.cs.
|
get |
If this is true
, the alpha value of the input pixels is preserved. Otherwise, the alpha channel is subject to the same convolution process as the other colour components.
Definition at line 56 of file ConvolutionFilter.cs.
|
get |
The scale relating the size of the kernel to graphics units.
Definition at line 51 of file ConvolutionFilter.cs.