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
interestRectangleDestination bounds to rasterize into.
intersectionRuleIntersectionRulePolygon intersection rule.
rasterizationModeRasterizationModeRasterization coverage mode.
samplingOriginRasterizerSamplingOriginSampling origin alignment.
antialiasThresholdfloatCoverage 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
Interest
Gets destination bounds to rasterize into.
public Rectangle Interest { get; }
Property Value
IntersectionRule
Gets the polygon intersection rule.
public IntersectionRule IntersectionRule { get; }
Property Value
RasterizationMode
Gets the rasterization coverage mode.
public RasterizationMode RasterizationMode { get; }
Property Value
SamplingOrigin
Gets the sampling origin alignment.
public RasterizerSamplingOrigin SamplingOrigin { get; }
Property Value
Methods
WithInterest(Rectangle)
Creates a copy of the current options with a different interest rectangle.
public RasterizerOptions WithInterest(Rectangle interest)
Parameters
interestRectangleThe replacement interest rectangle.
Returns
- RasterizerOptions
A new RasterizerOptions value.