BitmapExtensionMethods.BufferProcess

ParallelProcess<2>AbstractProcess
public abstract class BitmapExtensionMethods.BufferProcess : ParallelProcess<Color[], int>
Multi-threaded bitmap processor base class with a buffered colour array.

Constructors

BufferProcess

#
protected BufferProcess(Color[][] buffer, int x0, int x1, int y0, int y1)
Set up a process for a specific region of an image.
buffer (Color[][])Buffer data.
x0 (int)Inclusive leftmost pixel index to be processed.
x1 (int)Exclusive rightmost pixel index to be processed.
y0 (int)Inclusive topmost pixel index to be processed.
y1 (int)Exclusive bottommost pixel index to be processed.

BufferProcess

#
protected BufferProcess(Color[][] buffer)
Set up a process for the entire image.
buffer (Color[][])Buffer data.

Fields

_buffer

#
protected readonly Color[][] _buffer
Colour buffer.

_x0

#
protected readonly int _x0
Inclusive leftmost pixel index to be processed.

_x1

#
protected readonly int _x1
Exclusive rightmost pixel index to be processed.

_y0

#
protected readonly int _y0
Inclusive topmost pixel index to be processed.

_y1

#
protected readonly int _y1
Exclusive bottommost pixel index to be processed.

Properties

CountOverride

public int CountOverride { get; set; }
Gets or sets the number of iterations to process. If the override is negative, the size of the longest input array determines the count.
inherited fromAbstractProcess

RunSingleThreaded

public bool RunSingleThreaded { get; }
Gets whether this process is supposed to run in single threaded mode.
inherited fromAbstractProcess

ThreadCount

public int ThreadCount { get; set; }
Gets or sets the maximum degrees of parallelism for this process. Leave the value at a negative number to revert to default.
inherited fromAbstractProcess

Methods

CreateOptions

protected ParallelOptions CreateOptions(CancellationToken token)
inherited fromAbstractProcess
token (CancellationToken)

Perform

#
public Color[][] Perform()
Perform this process on all columns in the buffer.

Perform

public TResult[] Perform(T1[] data1, CancellationToken token)
inherited fromParallelProcess<TResult, T1>
data1 (T1[])
token (CancellationToken)

Perform

public TResult[] Perform(T1[] data1)
inherited fromParallelProcess<TResult, T1>
data1 (T1[])

Process

protected abstract TResult Process(T1 data, CancellationToken token)
inherited fromParallelProcess<TResult, T1>
data (T1)
token (CancellationToken)