// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using System; using System.Numerics; namespace SixLabors.ImageSharp.Drawing { /// /// Represents a simple path segment /// public interface ILineSegment { /// /// Gets the start point. /// public PointF StartPoint { get; } /// /// Gets the end point. /// /// /// The end point. /// public PointF EndPoint { get; } /// /// Gets the bounds of the linearized segment output. /// public RectangleF Bounds { get; } /// /// Returns the number of linear vertices emitted by this segment when flattened under the supplied /// device-space . /// /// The X/Y scale at which curves are flattened. Pass for local-space counts. /// The number of linear vertices this segment emits. public int LinearVertexCount(Vector2 scale); /// /// Writes the segment's linearized points to , baked at the supplied /// device-space . /// /// The destination point span. /// Whether to skip the first emitted point. /// The X/Y scale at which curves are flattened. Pass for local-space output. public void CopyTo(Span destination, bool skipFirstPoint, Vector2 scale); /// /// Transforms the current LineSegment using specified matrix. /// /// The matrix. /// A line segment with the matrix applied to it. public ILineSegment Transform(Matrix4x4 matrix); } }