summaryrefslogtreecommitdiff
path: root/ViewModels/Settings/SettingLimits.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ViewModels/Settings/SettingLimits.cs')
-rw-r--r--ViewModels/Settings/SettingLimits.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/ViewModels/Settings/SettingLimits.cs b/ViewModels/Settings/SettingLimits.cs
new file mode 100644
index 0000000..8a0f3ea
--- /dev/null
+++ b/ViewModels/Settings/SettingLimits.cs
@@ -0,0 +1,20 @@
+using Avalonia.Media.Imaging;
+using System;
+
+namespace Avalar.ViewModels.Settings
+{
+ public class SettingLimits : ISettingLimits
+ {
+ public SettingLimits(IBitmap bitmap)
+ {
+ var _ = bitmap ?? throw new ArgumentNullException(nameof(bitmap));
+
+ MaxWidth = Convert.ToUInt32(bitmap.Size.Width);
+ MaxHeight = Convert.ToUInt32(bitmap.Size.Height);
+ }
+
+ public uint MaxWidth { get; }
+
+ public uint MaxHeight { get; }
+ }
+}