Browse Source

feat: Align `PathSegments` ctor overloads to WPF `PathSegmentCollection` (#16809)

pull/16835/head
workgroupengineering 1 year ago
committed by GitHub
parent
commit
06ece8da88
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 30
      src/Avalonia.Base/Media/PathGeometryCollections.cs

30
src/Avalonia.Base/Media/PathGeometryCollections.cs

@ -1,3 +1,4 @@
using System.Collections.Generic;
using Avalonia.Collections; using Avalonia.Collections;
using Avalonia.Visuals.Platform; using Avalonia.Visuals.Platform;
@ -24,7 +25,36 @@ namespace Avalonia.Media
} }
} }
/// <summary>
/// Represents a collection of <see cref="PathSegment"/> objects that can be individually accessed by index.
/// </summary>
public sealed class PathSegments : AvaloniaList<PathSegment> public sealed class PathSegments : AvaloniaList<PathSegment>
{ {
/// <summary>
/// Initializes a new instance of the <see cref="PathSegments"/> class.
/// </summary>
public PathSegments()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="PathSegments"/> class with the specified collection of <see cref="PathSegment"/> objects.
/// </summary>
/// <param name="collection">The collection of <see cref="PathSegment"/> objects that make up the <see cref="PathSegments"/>.</param>
/// <exception cref="System.ArgumentNullException"><paramref name="collection"/> is <c>null</c>.</exception>
public PathSegments(IEnumerable<PathSegment> collection) :
base(collection)
{
}
/// <summary>
/// Initializes a new instance of the PathSegments class with the specified capacity,
/// or the number of PathSegment objects the collection is initially capable of storing.
/// </summary>
/// <param name="capacity">The number of <see cref="PathSegment"/> objects that the collection is initially capable of storing.</param>
public PathSegments(int capacity) :
base(capacity)
{
}
} }
} }

Loading…
Cancel
Save