Stencil(ReadOnlySpan, Int32, Boolean, Span) Method

Definition

Assembly Broadside.dll

Computes the coverage of a row of a stencil mask or explicit mask (1 bit per sample): 255 where the sample paints, 0 where it leaves the backdrop.

public static void Stencil(ReadOnlySpan<byte> row, int width, bool inverted, Span<byte> coverage)

Parameters

row
ReadOnlySpan<Byte>

The packed row.

width
Int32

The number of samples.

inverted
Boolean

Whether the mask's Decode array is [1 0] (combined with SamplesInverted; see IsInverted): then a sample 1 paints. Otherwise a sample 0 paints.

coverage
Span<Byte>

One byte per sample.

Remarks

ISO 32000-2 §8.9.6.2 and §8.9.6.3.