Class PixelBlender<TPixel>
Abstract base class for calling pixel composition functions
Inherited Members
Namespace: SixLabors.ImageSharp.PixelFormats
Assembly: SixLabors.ImageSharp.dll
Syntax
public abstract class PixelBlender<TPixel> where TPixel : unmanaged, IPixel<TPixel>
Type Parameters
Name | Description |
---|---|
TPixel | The type of the pixel |
Methods
| Edit this page View SourceBlend(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<float>)
Blends 2 rows together
Declaration
public void Blend(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixel> source, ReadOnlySpan<float> amount)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | Configuration to use internally |
Span<TPixel> | destination | the destination span |
ReadOnlySpan<TPixel> | background | the background span |
ReadOnlySpan<TPixel> | source | the source span |
ReadOnlySpan<float> | amount | A span with values between 0 and 1 indicating the weight of the second source vector. At amount = 0, "background" is returned, at amount = 1, "source" is returned. |
Blend(TPixel, TPixel, float)
Blend 2 pixels together.
Declaration
public abstract TPixel Blend(TPixel background, TPixel source, float amount)
Parameters
Type | Name | Description |
---|---|---|
TPixel | background | The background color. |
TPixel | source | The source color. |
float | amount | A value between 0 and 1 indicating the weight of the second source vector. At amount = 0, "background" is returned, at amount = 1, "source" is returned. |
Returns
Type | Description |
---|---|
TPixel | The final pixel value after composition. |
BlendFunction(Span<Vector4>, ReadOnlySpan<Vector4>, ReadOnlySpan<Vector4>, ReadOnlySpan<float>)
Blend 2 rows together.
Declaration
protected abstract void BlendFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, ReadOnlySpan<Vector4> source, ReadOnlySpan<float> amount)
Parameters
Type | Name | Description |
---|---|---|
Span<Vector4> | destination | destination span |
ReadOnlySpan<Vector4> | background | the background span |
ReadOnlySpan<Vector4> | source | the source span |
ReadOnlySpan<float> | amount | A span with values between 0 and 1 indicating the weight of the second source vector. At amount = 0, "background" is returned, at amount = 1, "source" is returned. |
BlendFunction(Span<Vector4>, ReadOnlySpan<Vector4>, ReadOnlySpan<Vector4>, float)
Blend 2 rows together.
Declaration
protected abstract void BlendFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, ReadOnlySpan<Vector4> source, float amount)
Parameters
Type | Name | Description |
---|---|---|
Span<Vector4> | destination | destination span |
ReadOnlySpan<Vector4> | background | the background span |
ReadOnlySpan<Vector4> | source | the source span |
float | amount | A value between 0 and 1 indicating the weight of the second source vector. At amount = 0, "background" is returned, at amount = 1, "source" is returned. |
Blend<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, ReadOnlySpan<float>)
Blends 2 rows together
Declaration
public void Blend<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, ReadOnlySpan<float> amount) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | Configuration to use internally |
Span<TPixel> | destination | the destination span |
ReadOnlySpan<TPixel> | background | the background span |
ReadOnlySpan<TPixelSrc> | source | the source span |
ReadOnlySpan<float> | amount | A span with values between 0 and 1 indicating the weight of the second source vector. At amount = 0, "background" is returned, at amount = 1, "source" is returned. |
Type Parameters
Name | Description |
---|---|
TPixelSrc | the pixel format of the source span |
Blend<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, float)
Blends 2 rows together
Declaration
public void Blend<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, float amount) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | Configuration to use internally |
Span<TPixel> | destination | the destination span |
ReadOnlySpan<TPixel> | background | the background span |
ReadOnlySpan<TPixelSrc> | source | the source span |
float | amount | A value between 0 and 1 indicating the weight of the second source vector. At amount = 0, "background" is returned, at amount = 1, "source" is returned. |
Type Parameters
Name | Description |
---|---|
TPixelSrc | the pixel format of the source span |