// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using System.Numerics; namespace SixLabors.ImageSharp.Drawing.Processing { /// /// Provides options for influencing drawing operations, combining graphics rendering settings, /// shape fill-rule behavior, and an optional coordinate transform. /// public class DrawingOptions { private GraphicsOptions graphicsOptions; private ShapeOptions shapeOptions; /// /// Initializes a new instance of the class. /// public DrawingOptions() { this.graphicsOptions = new GraphicsOptions(); this.shapeOptions = new ShapeOptions(); this.Transform = Matrix4x4.Identity; } internal DrawingOptions( GraphicsOptions graphicsOptions, ShapeOptions shapeOptions, Matrix4x4 transform) { DebugGuard.NotNull(graphicsOptions, nameof(graphicsOptions)); DebugGuard.NotNull(shapeOptions, nameof(shapeOptions)); this.graphicsOptions = graphicsOptions; this.shapeOptions = shapeOptions; this.Transform = transform; } /// /// Gets or sets the graphics rendering options that control antialiasing, blending, alpha composition, /// and coverage thresholding for the drawing operation. /// public GraphicsOptions GraphicsOptions { get => this.graphicsOptions; set { Guard.NotNull(value, nameof(this.GraphicsOptions)); this.graphicsOptions = value; } } /// /// Gets or sets the shape options that control fill-rule intersection mode and boolean clipping behavior. /// public ShapeOptions ShapeOptions { get => this.shapeOptions; set { Guard.NotNull(value, nameof(this.ShapeOptions)); this.shapeOptions = value; } } /// /// 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 . /// public Matrix4x4 Transform { get; set; } } }