This commit is contained in:
Scott Williams 2017-02-03 19:15:38 +00:00
Родитель d6efaea442
Коммит 4c0b7f5e3a
2 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -26,5 +26,16 @@ namespace SixLabors.Shapes
{
return path.Transform(Matrix3x2.CreateRotation(radians, path.Bounds.Center));
}
/// <summary>
/// Creates a path translated by the supplied postion
/// </summary>
/// <param name="path">The path to translate.</param>
/// <param name="position">The translation position.</param>
/// <returns></returns>
public static IPath Translate(this IPath path, Vector2 position)
{
return path.Transform(Matrix3x2.CreateTranslation(position));
}
}
}

Просмотреть файл

@ -26,5 +26,16 @@ namespace SixLabors.Shapes
{
return shape.Transform(Matrix3x2.CreateRotation(radians, shape.Bounds.Center));
}
/// <summary>
/// Creates a shape translated by the supplied postion
/// </summary>
/// <param name="shape">The shape to translate.</param>
/// <param name="position">The translation position.</param>
/// <returns></returns>
public static IShape Translate(this IShape shape, Vector2 position)
{
return shape.Transform(Matrix3x2.CreateTranslation(position));
}
}
}