diff --git a/Greenshot/Helpers/ScaleHelper.cs b/Greenshot/Helpers/ScaleHelper.cs
index 249b13b8a..d0173b365 100644
--- a/Greenshot/Helpers/ScaleHelper.cs
+++ b/Greenshot/Helpers/ScaleHelper.cs
@@ -31,6 +31,10 @@ namespace Greenshot.Helpers {
[Flags]
public enum ScaleOptions {
+ ///
+ /// Default scale behavior.
+ ///
+ Default = 0x00,
///
/// Scale a rectangle in two our four directions, mirrored at it's center coordinates
///
@@ -123,7 +127,7 @@ namespace Greenshot.Helpers {
}
public static void Scale(ref RectangleF originalRectangle, int resizeHandlePosition, PointF resizeHandleCoords) {
- Scale(ref originalRectangle, resizeHandlePosition, resizeHandleCoords, 0x0);
+ Scale(ref originalRectangle, resizeHandlePosition, resizeHandleCoords, null);
}
///
@@ -133,7 +137,7 @@ namespace Greenshot.Helpers {
/// position of the handle/gripper being used for resized, see constants in Gripper.cs, e.g. Gripper.POSITION_TOP_LEFT
/// coordinates of the used handle/gripper
/// ScaleOptions to use when scaling
- public static void Scale(ref RectangleF originalRectangle, int resizeHandlePosition, PointF resizeHandleCoords, ScaleOptions options) {
+ public static void Scale(ref RectangleF originalRectangle, int resizeHandlePosition, PointF resizeHandleCoords, ScaleOptions? options) {
if(options == null) {
options = GetScaleOptions();
}
@@ -319,9 +323,9 @@ namespace Greenshot.Helpers {
public static ScaleHelper.ScaleOptions GetScaleOptions() {
bool anchorAtCenter = (Control.ModifierKeys & Keys.Control) != 0;
bool maintainAspectRatio = ((Control.ModifierKeys & Keys.Shift) != 0);
- ScaleHelper.ScaleOptions opts = 0x0;
- if(anchorAtCenter) opts |= ScaleHelper.ScaleOptions.Centered;
- if(maintainAspectRatio) opts |= ScaleHelper.ScaleOptions.Rational;
+ ScaleOptions opts = ScaleOptions.Default;
+ if(anchorAtCenter) opts |= ScaleOptions.Centered;
+ if(maintainAspectRatio) opts |= ScaleOptions.Rational;
return opts;
}