📷 A modern, cross-platform, 2D Graphics library for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
1020 B

// <copyright file="PointInfoExtensions.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing
{
/// <summary>
/// Extension methods for helping to bridge Shaper2D and ImageSharp primitives.
/// </summary>
internal static class PointInfoExtensions
{
/// <summary>
/// Converts a <see cref="SixLabors.Shapes.PointInfo"/> to an ImageSharp <see cref="PointInfo"/>.
/// </summary>
/// <param name="source">The source.</param>
/// <returns>A <see cref="PointInfo"/> representation of this <see cref="SixLabors.Shapes.PointInfo"/></returns>
public static PointInfo Convert(this SixLabors.Shapes.PointInfo source)
{
return new PointInfo
{
DistanceAlongPath = source.DistanceAlongPath,
DistanceFromPath = source.DistanceFromPath
};
}
}
}