From fd93248d112ad93d3dbcab9efa0d2bcb1c052581 Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Mon, 9 Aug 2021 11:59:23 +0200 Subject: [PATCH] Move CropMode enum into seperate file --- .../ImageProcessors/CropMode.cs | 18 ++++++++++++++++++ .../ImageProcessors/CropWebProcessor.cs | 15 --------------- 2 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 src/Umbraco.Web.Common/ImageProcessors/CropMode.cs diff --git a/src/Umbraco.Web.Common/ImageProcessors/CropMode.cs b/src/Umbraco.Web.Common/ImageProcessors/CropMode.cs new file mode 100644 index 0000000000..6e08c6e05c --- /dev/null +++ b/src/Umbraco.Web.Common/ImageProcessors/CropMode.cs @@ -0,0 +1,18 @@ +namespace Umbraco.Cms.Web.Common.ImageProcessors +{ + /// + /// Represents the mode used to calculate a crop. + /// + public enum CropMode + { + /// + /// Crops the image using the standard rectangle model of x, y, width, height. + /// + Pixels, + + /// + /// Crops the image using the percentages model of left, top, right, bottom. + /// + Percentage + } +} diff --git a/src/Umbraco.Web.Common/ImageProcessors/CropWebProcessor.cs b/src/Umbraco.Web.Common/ImageProcessors/CropWebProcessor.cs index d5e2adb2e5..828154447c 100644 --- a/src/Umbraco.Web.Common/ImageProcessors/CropWebProcessor.cs +++ b/src/Umbraco.Web.Common/ImageProcessors/CropWebProcessor.cs @@ -88,19 +88,4 @@ namespace Umbraco.Cms.Web.Common.ImageProcessors private static CropMode GetMode(IDictionary commands, CommandParser parser, CultureInfo culture) => parser.ParseValue(commands.GetValueOrDefault(Mode), culture); } - - /// - /// Enumerated cop modes to apply to cropped images. - /// - public enum CropMode - { - /// - /// Crops the image using the standard rectangle model of x, y, width, height. - /// - Pixels, - /// - /// Crops the image using percentages model left, top, right, bottom. - /// - Percentage - } }