Luthfi Tri Atmaja
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
18 additions and
0 deletions
-
src/Avalonia.Visuals/Media/PathGeometryCollections.cs
|
|
|
@ -1,9 +1,27 @@ |
|
|
|
using Avalonia.Collections; |
|
|
|
using Avalonia.Visuals.Platform; |
|
|
|
|
|
|
|
namespace Avalonia.Media |
|
|
|
{ |
|
|
|
public sealed class PathFigures : AvaloniaList<PathFigure> |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Parses the specified path data to a <see cref="PathFigures"/>.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="pathData">The s.</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static PathFigures Parse(string pathData) |
|
|
|
{ |
|
|
|
var pathGeometry = new PathGeometry(); |
|
|
|
|
|
|
|
using (var context = new PathGeometryContext(pathGeometry)) |
|
|
|
using (var parser = new PathMarkupParser(context)) |
|
|
|
{ |
|
|
|
parser.Parse(pathData); |
|
|
|
} |
|
|
|
|
|
|
|
return pathGeometry.Figures; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public sealed class PathSegments : AvaloniaList<PathSegment> |
|
|
|
|