Class PixelBlender<TPixel>
- Namespace
- SixLabors.ImageSharp.PixelFormats
- Assembly
- SixLabors.ImageSharp.dll
Abstract base class for calling pixel composition functions
public abstract class PixelBlender<TPixel> where TPixel : unmanaged, IPixel<TPixel>
Type Parameters
TPixelThe type of the pixel
- Inheritance
-
PixelBlender<TPixel>
- Inherited Members
Methods
Blend(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<float>)
Blends 2 rows together
public void Blend(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixel> source, ReadOnlySpan<float> amount)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixel>the source span
amountReadOnlySpan<float>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(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<float>, Span<Vector4>)
Blends 2 rows together using caller-provided temporary vector scratch.
public void Blend(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixel> source, ReadOnlySpan<float> amount, Span<Vector4> workingBuffer)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixel>the source span
amountReadOnlySpan<float>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.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 3 rows.
Blend(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, TPixel, ReadOnlySpan<float>)
Blends a row against a constant source color.
public void Blend(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, TPixel source, ReadOnlySpan<float> amount)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceTPixelthe source color
amountReadOnlySpan<float>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(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, TPixel, ReadOnlySpan<float>, Span<Vector4>)
Blends a row against a constant source color using caller-provided temporary vector scratch.
public void Blend(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, TPixel source, ReadOnlySpan<float> amount, Span<Vector4> workingBuffer)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceTPixelthe source color
amountReadOnlySpan<float>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.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 2 rows.
Blend(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, TPixel, float)
Blends a row against a constant source color.
public void Blend(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, TPixel source, float amount)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceTPixelthe source color
amountfloatA 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(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, TPixel, float, Span<Vector4>)
Blends a row against a constant source color using caller-provided temporary vector scratch.
public void Blend(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, TPixel source, float amount, Span<Vector4> workingBuffer)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceTPixelthe source color
amountfloatA 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.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 2 rows.
Blend(TPixel, TPixel, float)
Blend 2 pixels together.
public abstract TPixel Blend(TPixel background, TPixel source, float amount)
Parameters
backgroundTPixelThe background color.
sourceTPixelThe source color.
amountfloatA 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
- TPixel
The final pixel value after composition.
BlendFunction(Span<Vector4>, ReadOnlySpan<Vector4>, Vector4, ReadOnlySpan<float>)
Blend a row against a constant source color.
protected abstract void BlendFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, Vector4 source, ReadOnlySpan<float> amount)
Parameters
destinationSpan<Vector4>destination span
backgroundReadOnlySpan<Vector4>the background span
sourceVector4the source color vector
amountReadOnlySpan<float>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>, Vector4, float)
Blend a row against a constant source color.
protected abstract void BlendFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, Vector4 source, float amount)
Parameters
destinationSpan<Vector4>destination span
backgroundReadOnlySpan<Vector4>the background span
sourceVector4the source color vector
amountfloatA 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.
BlendFunction(Span<Vector4>, ReadOnlySpan<Vector4>, ReadOnlySpan<Vector4>, ReadOnlySpan<float>)
Blend 2 rows together.
protected abstract void BlendFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, ReadOnlySpan<Vector4> source, ReadOnlySpan<float> amount)
Parameters
destinationSpan<Vector4>destination span
backgroundReadOnlySpan<Vector4>the background span
sourceReadOnlySpan<Vector4>the source span
amountReadOnlySpan<float>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.
protected abstract void BlendFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, ReadOnlySpan<Vector4> source, float amount)
Parameters
destinationSpan<Vector4>destination span
backgroundReadOnlySpan<Vector4>the background span
sourceReadOnlySpan<Vector4>the source span
amountfloatA 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.
BlendWithCoverage(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<float>, ReadOnlySpan<float>)
Blends 2 rows together with per-pixel coverage.
public void BlendWithCoverage(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixel> source, ReadOnlySpan<float> amount, ReadOnlySpan<float> coverage)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixel>the source span
amountReadOnlySpan<float>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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
BlendWithCoverage(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<float>, ReadOnlySpan<float>, Span<Vector4>)
Blends 2 rows together with per-pixel coverage using caller-provided temporary vector scratch.
public void BlendWithCoverage(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixel> source, ReadOnlySpan<float> amount, ReadOnlySpan<float> coverage, Span<Vector4> workingBuffer)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixel>the source span
amountReadOnlySpan<float>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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 3 rows.
BlendWithCoverage(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, TPixel, ReadOnlySpan<float>, ReadOnlySpan<float>)
Blends a row against a constant source color with per-pixel coverage.
public void BlendWithCoverage(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, TPixel source, ReadOnlySpan<float> amount, ReadOnlySpan<float> coverage)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceTPixelthe source color
amountReadOnlySpan<float>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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
BlendWithCoverage(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, TPixel, ReadOnlySpan<float>, ReadOnlySpan<float>, Span<Vector4>)
Blends a row against a constant source color with per-pixel coverage using caller-provided temporary vector scratch.
public void BlendWithCoverage(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, TPixel source, ReadOnlySpan<float> amount, ReadOnlySpan<float> coverage, Span<Vector4> workingBuffer)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceTPixelthe source color
amountReadOnlySpan<float>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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 2 rows.
BlendWithCoverage(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, TPixel, float, ReadOnlySpan<float>)
Blends a row against a constant source color with per-pixel coverage.
public void BlendWithCoverage(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, TPixel source, float amount, ReadOnlySpan<float> coverage)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceTPixelthe source color
amountfloatA 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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
BlendWithCoverage(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, TPixel, float, ReadOnlySpan<float>, Span<Vector4>)
Blends a row against a constant source color with per-pixel coverage using caller-provided temporary vector scratch.
public void BlendWithCoverage(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, TPixel source, float amount, ReadOnlySpan<float> coverage, Span<Vector4> workingBuffer)
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceTPixelthe source color
amountfloatA 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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 2 rows.
BlendWithCoverageFunction(Span<Vector4>, ReadOnlySpan<Vector4>, Vector4, ReadOnlySpan<float>, ReadOnlySpan<float>)
Blend a row against a constant source color with per-pixel coverage.
protected virtual void BlendWithCoverageFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, Vector4 source, ReadOnlySpan<float> amount, ReadOnlySpan<float> coverage)
Parameters
destinationSpan<Vector4>destination span
backgroundReadOnlySpan<Vector4>the background span
sourceVector4the source color vector
amountReadOnlySpan<float>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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
BlendWithCoverageFunction(Span<Vector4>, ReadOnlySpan<Vector4>, Vector4, float, ReadOnlySpan<float>)
Blend a row against a constant source color with per-pixel coverage.
protected virtual void BlendWithCoverageFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, Vector4 source, float amount, ReadOnlySpan<float> coverage)
Parameters
destinationSpan<Vector4>destination span
backgroundReadOnlySpan<Vector4>the background span
sourceVector4the source color vector
amountfloatA 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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
BlendWithCoverageFunction(Span<Vector4>, ReadOnlySpan<Vector4>, ReadOnlySpan<Vector4>, ReadOnlySpan<float>, ReadOnlySpan<float>)
Blend 2 rows together with per-pixel coverage.
protected virtual void BlendWithCoverageFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, ReadOnlySpan<Vector4> source, ReadOnlySpan<float> amount, ReadOnlySpan<float> coverage)
Parameters
destinationSpan<Vector4>destination span
backgroundReadOnlySpan<Vector4>the background span
sourceReadOnlySpan<Vector4>the source span
amountReadOnlySpan<float>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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
BlendWithCoverageFunction(Span<Vector4>, ReadOnlySpan<Vector4>, ReadOnlySpan<Vector4>, float, ReadOnlySpan<float>)
Blend 2 rows together with per-pixel coverage.
protected virtual void BlendWithCoverageFunction(Span<Vector4> destination, ReadOnlySpan<Vector4> background, ReadOnlySpan<Vector4> source, float amount, ReadOnlySpan<float> coverage)
Parameters
destinationSpan<Vector4>destination span
backgroundReadOnlySpan<Vector4>the background span
sourceReadOnlySpan<Vector4>the source span
amountfloatA 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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
BlendWithCoverage<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, ReadOnlySpan<float>, ReadOnlySpan<float>)
Blends 2 rows together with per-pixel coverage.
public void BlendWithCoverage<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, ReadOnlySpan<float> amount, ReadOnlySpan<float> coverage) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixelSrc>the source span
amountReadOnlySpan<float>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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
Type Parameters
TPixelSrcthe pixel format of the source span
BlendWithCoverage<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, ReadOnlySpan<float>, ReadOnlySpan<float>, Span<Vector4>)
Blends 2 rows together with per-pixel coverage using caller-provided temporary vector scratch.
public void BlendWithCoverage<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, ReadOnlySpan<float> amount, ReadOnlySpan<float> coverage, Span<Vector4> workingBuffer) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixelSrc>the source span
amountReadOnlySpan<float>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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 3 rows.
Type Parameters
TPixelSrcthe pixel format of the source span
BlendWithCoverage<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, float, ReadOnlySpan<float>)
Blends 2 rows together with per-pixel coverage.
public void BlendWithCoverage<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, float amount, ReadOnlySpan<float> coverage) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixelSrc>the source span
amountfloatA 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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
Type Parameters
TPixelSrcthe pixel format of the source span
BlendWithCoverage<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, float, ReadOnlySpan<float>, Span<Vector4>)
Blends 2 rows together with per-pixel coverage using caller-provided temporary vector scratch.
public void BlendWithCoverage<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, float amount, ReadOnlySpan<float> coverage, Span<Vector4> workingBuffer) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixelSrc>the source span
amountfloatA 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.
coverageReadOnlySpan<float>A span with coverage values between 0 and 1.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 3 rows.
Type Parameters
TPixelSrcthe pixel format of the source span
Blend<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, ReadOnlySpan<float>)
Blends 2 rows together
public void Blend<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, ReadOnlySpan<float> amount) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixelSrc>the source span
amountReadOnlySpan<float>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
TPixelSrcthe pixel format of the source span
Blend<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, ReadOnlySpan<float>, Span<Vector4>)
Blends 2 rows together using caller-provided temporary vector scratch.
public void Blend<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, ReadOnlySpan<float> amount, Span<Vector4> workingBuffer) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixelSrc>the source span
amountReadOnlySpan<float>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.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 3 rows.
Type Parameters
TPixelSrcthe pixel format of the source span
Blend<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, float)
Blends 2 rows together
public void Blend<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, float amount) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixelSrc>the source span
amountfloatA 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
TPixelSrcthe pixel format of the source span
Blend<TPixelSrc>(Configuration, Span<TPixel>, ReadOnlySpan<TPixel>, ReadOnlySpan<TPixelSrc>, float, Span<Vector4>)
Blends 2 rows together using caller-provided temporary vector scratch.
public void Blend<TPixelSrc>(Configuration configuration, Span<TPixel> destination, ReadOnlySpan<TPixel> background, ReadOnlySpan<TPixelSrc> source, float amount, Span<Vector4> workingBuffer) where TPixelSrc : unmanaged, IPixel<TPixelSrc>
Parameters
configurationConfigurationConfiguration to use internally
destinationSpan<TPixel>the destination span
backgroundReadOnlySpan<TPixel>the background span
sourceReadOnlySpan<TPixelSrc>the source span
amountfloatA 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.
workingBufferSpan<Vector4>Reusable temporary vector scratch with capacity for at least 3 rows.
Type Parameters
TPixelSrcthe pixel format of the source span
FromBlendVector4(Configuration, Span<Vector4>, Span<TPixel>)
Converts blend results from this blender's scaled-vector representation to destination pixels.
protected virtual void FromBlendVector4(Configuration configuration, Span<Vector4> source, Span<TPixel> destination)
Parameters
configurationConfigurationThe configuration.
sourceSpan<Vector4>The source vectors.
destinationSpan<TPixel>The destination pixels.
ToBlendVector4(TPixel)
Converts a source pixel to the vector representation consumed by the blend functions.
protected virtual Vector4 ToBlendVector4(TPixel source)
Parameters
sourceTPixelThe source pixel.
Returns
- Vector4
The source vector.
ToBlendVector4<TPixelSource>(Configuration, ReadOnlySpan<TPixelSource>, Span<Vector4>)
Converts source pixels to the scaled-vector representation consumed by this blender.
protected virtual void ToBlendVector4<TPixelSource>(Configuration configuration, ReadOnlySpan<TPixelSource> source, Span<Vector4> destination) where TPixelSource : unmanaged, IPixel<TPixelSource>
Parameters
configurationConfigurationThe configuration.
sourceReadOnlySpan<TPixelSource>The source pixels.
destinationSpan<Vector4>The destination vectors.
Type Parameters
TPixelSourceThe source pixel format.