// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using System.Collections.Generic; using System.Numerics; namespace SixLabors.Fonts.Rendering { /// /// A single painted layer comprising a paint, a fill rule, and a path stream. /// All coordinates must be pre-transformed in Fonts prior to construction. /// internal readonly struct PaintedLayer { /// /// Initializes a new instance of the struct. /// /// The paint definition. /// The fill rule. /// The transform applied to all path coordinates. /// An optional clip bounds to apply when rasterizing this layer. /// The path command stream for this layer. public PaintedLayer( Paint? paint, FillRule fillRule, Matrix3x2 transform, Bounds? clipBounds, IReadOnlyList path) { this.Paint = paint; this.FillRule = fillRule; this.Transform = transform; this.ClipBounds = clipBounds; this.Path = path; } /// /// Gets the paint definition for this layer. /// public Paint? Paint { get; } /// /// Gets the fill rule for rasterization. /// public FillRule FillRule { get; } /// /// Gets the transform applied to all path coordinates. /// public Matrix3x2 Transform { get; } public Bounds? ClipBounds { get; } /// /// Gets the path stream for this layer. /// public IReadOnlyList Path { get; } } }