Table of Contents

Class DrawingOptions

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

Provides options for influencing drawing operations, combining graphics rendering settings, the fill-rule intersection mode, and an optional coordinate transform.

public class DrawingOptions
Inheritance
DrawingOptions
Inherited Members

Constructors

DrawingOptions()

Initializes a new instance of the DrawingOptions class.

public DrawingOptions()

Fields

DefaultTextContrast

The default perceptual contrast boost applied to antialiased text rendering.

public const float DefaultTextContrast = 0.5

Field Value

float

Properties

GraphicsOptions

Gets or sets the graphics rendering options that control antialiasing, blending, and alpha composition for the drawing operation.

public GraphicsOptions GraphicsOptions { get; set; }

Property Value

GraphicsOptions

IntersectionRule

Gets or sets the fill rule used to determine which regions of a self-intersecting or multi-contour path are inside the filled area. Defaults to NonZero.

public IntersectionRule IntersectionRule { get; set; }

Property Value

IntersectionRule

TextContrast

Gets or sets the perceptual contrast boost applied to antialiased text rendering. Coverage is remapped through an S-curve that darkens mostly covered pixels and lightens mostly empty ones, so glyph stems solidify while counters and gaps stay bright; empty, half-covered, and fully covered pixels are unchanged. 0 disables the boost and renders text identically to plain vector fills; 1 applies the full smoothstep remap. Because the curve lightens sub-half coverage, high values gradually thin hairline stems in very light faces at very small sizes; lower the value if hairline preservation matters more than contrast. The boost applies only to text drawn through the text APIs; general vector fills and strokes are never affected. Defaults to DefaultTextContrast.

public float TextContrast { get; set; }

Property Value

float

Transform

Gets or sets the transform matrix applied to vector output before rasterization. For strokes, the pen is expanded in local geometry space and the resulting outline is transformed before rasterization. Defaults to Identity.

public Matrix4x4 Transform { get; set; }

Property Value

Matrix4x4