Table of Contents

Struct RasterizerOptions

Namespace
SixLabors.ImageSharp.Drawing.Processing.Backends
Assembly
SixLabors.ImageSharp.Drawing.dll

Immutable options used by rasterizers when scan-converting vector geometry.

public readonly struct RasterizerOptions
Inherited Members

Constructors

RasterizerOptions(Rectangle, IntersectionRule, RasterizationMode, RasterizerSamplingOrigin, float)

Initializes a new instance of the RasterizerOptions struct.

public RasterizerOptions(Rectangle interest, IntersectionRule intersectionRule, RasterizationMode rasterizationMode, RasterizerSamplingOrigin samplingOrigin, float antialiasThreshold)

Parameters

interest Rectangle

Destination bounds to rasterize into.

intersectionRule IntersectionRule

Polygon intersection rule.

rasterizationMode RasterizationMode

Rasterization coverage mode.

samplingOrigin RasterizerSamplingOrigin

Sampling origin alignment.

antialiasThreshold float

Coverage threshold for aliased mode (0 to 1).

Properties

AntialiasThreshold

Gets the coverage threshold used when RasterizationMode is Aliased. Pixels with coverage above this value are rendered as fully opaque; pixels below are discarded.

public float AntialiasThreshold { get; }

Property Value

float

Interest

Gets destination bounds to rasterize into.

public Rectangle Interest { get; }

Property Value

Rectangle

IntersectionRule

Gets the polygon intersection rule.

public IntersectionRule IntersectionRule { get; }

Property Value

IntersectionRule

RasterizationMode

Gets the rasterization coverage mode.

public RasterizationMode RasterizationMode { get; }

Property Value

RasterizationMode

SamplingOrigin

Gets the sampling origin alignment.

public RasterizerSamplingOrigin SamplingOrigin { get; }

Property Value

RasterizerSamplingOrigin

Methods

WithInterest(Rectangle)

Creates a copy of the current options with a different interest rectangle.

public RasterizerOptions WithInterest(Rectangle interest)

Parameters

interest Rectangle

The replacement interest rectangle.

Returns

RasterizerOptions

A new RasterizerOptions value.