From 9be70f0d9e769646cb71484c6913cb9be42e0a49 Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Mon, 26 Aug 2024 09:28:29 +0200 Subject: [PATCH] feat: Align `PathSegments` ctor overloads to WPF `PathSegmentCollection` --- .../Media/PathGeometryCollections.cs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Avalonia.Base/Media/PathGeometryCollections.cs b/src/Avalonia.Base/Media/PathGeometryCollections.cs index 1165b192a75..da4b9ddfa79 100644 --- a/src/Avalonia.Base/Media/PathGeometryCollections.cs +++ b/src/Avalonia.Base/Media/PathGeometryCollections.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Avalonia.Collections; using Avalonia.Visuals.Platform; @@ -24,7 +25,36 @@ public static PathFigures Parse(string pathData) } } + /// + /// Represents a collection of objects that can be individually accessed by index. + /// public sealed class PathSegments : AvaloniaList { + /// + /// Initializes a new instance of the class. + /// + public PathSegments() + { + } + + /// + /// Initializes a new instance of the class with the specified collection of objects. + /// + /// The collection of objects that make up the . + /// is null. + public PathSegments(IEnumerable collection) : + base(collection) + { + } + + /// + /// 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. + /// + /// The number of objects that the collection is initially capable of storing. + public PathSegments(int capacity) : + base(capacity) + { + } } }