Class GraphicsOptions
- Namespace
- SixLabors.ImageSharp
- Assembly
- SixLabors.ImageSharp.dll
Provides configuration for controlling how graphics operations are rendered, including antialiasing, pixel blending, alpha composition, and coverage thresholding.
public class GraphicsOptions : IDeepCloneable<GraphicsOptions>
- Inheritance
-
GraphicsOptions
- Implements
- Inherited Members
Constructors
GraphicsOptions()
Initializes a new instance of the GraphicsOptions class.
public GraphicsOptions()
Properties
AlphaCompositionMode
Gets or sets the alpha composition mode that determines how source and destination alpha channels are combined using Porter-Duff operators. Defaults to SrcOver.
public PixelAlphaCompositionMode AlphaCompositionMode { get; set; }
Property Value
Antialias
Gets or sets a value indicating whether antialiasing should be applied. When true, edges are rendered with smooth sub-pixel coverage. When false, coverage is snapped to binary (fully opaque or fully transparent) using AntialiasThreshold as the cutoff. Defaults to true.
public bool Antialias { get; set; }
Property Value
AntialiasThreshold
Gets or sets the coverage threshold used when Antialias is false.
Pixels with antialiased coverage above this value are rendered as fully opaque;
pixels below are discarded. Valid range is 0 to 1. Lower values preserve more
thin features at small sizes. Defaults to 0.5F.
public float AntialiasThreshold { get; set; }
Property Value
BlendPercentage
Gets or sets the blending percentage applied to the drawing operation.
A value of 1.0 applies the operation at full strength; 0.0 makes it invisible.
Valid range is 0 to 1. Defaults to 1.0F.
public float BlendPercentage { get; set; }
Property Value
ColorBlendingMode
Gets or sets the color blending mode used to combine source and destination pixel colors. Defaults to Normal.
public PixelColorBlendingMode ColorBlendingMode { get; set; }
Property Value
Methods
DeepClone()
Creates a new GraphicsOptions that is a deep copy of the current instance.
public GraphicsOptions DeepClone()