Exemplo n.º 1
0
 /// <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>A <see cref="IPath"/> with a translate transform applied.</returns>
 public static IPathCollection Translate(this IPathCollection path, PointF position)
 {
     return(path.Transform(Matrix3x2.CreateTranslation(position)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a path translated by the supplied postion
 /// </summary>
 /// <param name="path">The path to translate.</param>
 /// <param name="scale">The amount to scale along both the x and y axis.</param>
 /// <returns>A <see cref="IPath"/> with a translate transform applied.</returns>
 public static IPathCollection Scale(this IPathCollection path, float scale)
 {
     return(path.Transform(Matrix3x2.CreateScale(scale, RectangleF.Center(path.Bounds))));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a path rotated by the specified radians around its center.
 /// </summary>
 /// <param name="path">The path to rotate.</param>
 /// <param name="radians">The radians to rotate the path.</param>
 /// <returns>A <see cref="IPath"/> with a rotate transform applied.</returns>
 public static IPathCollection Rotate(this IPathCollection path, float radians)
 {
     return(path.Transform(Matrix3x2Extensions.CreateRotation(radians, RectangleF.Center(path.Bounds))));
 }