📷 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.
 
 

21 lines
933 B

// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Processing;
/// <summary>
/// Defines extensions that allow the application of rotate-flip operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class RotateFlipExtensions
{
/// <summary>
/// Rotates and flips an image by the given instructions.
/// </summary>
/// <param name="source">The current image processing context.</param>
/// <param name="rotateMode">The <see cref="RotateMode"/> to perform the rotation.</param>
/// <param name="flipMode">The <see cref="FlipMode"/> to perform the flip.</param>
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
public static IImageProcessingContext RotateFlip(this IImageProcessingContext source, RotateMode rotateMode, FlipMode flipMode)
=> source.Rotate(rotateMode).Flip(flipMode);
}