ImageSharp/PolygonClipper/VertexFlags.cs
2026-08-03 22:31:27 +02:00

34 lines
916 B
C#

// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System;
namespace SixLabors.PolygonClipper {
/// <summary>
/// Classifies sweep vertices by local-extrema role during bound construction.
/// </summary>
/// <remarks>
/// The self-intersection sweep decomposes each contour into monotonic bounds that
/// start at local minima and terminate at local maxima. These flags annotate
/// each <see cref="SweepVertex"/> with that role.
/// </remarks>
[Flags]
internal enum VertexFlags
{
/// <summary>
/// No extrema role is assigned.
/// </summary>
None = 0,
/// <summary>
/// Marks a local maximum vertex (bound endpoint).
/// </summary>
LocalMax = 1 << 0,
/// <summary>
/// Marks a local minimum vertex (bound start).
/// </summary>
LocalMin = 1 << 1
}
}