summaryrefslogtreecommitdiff
path: root/plugins/Skins/SkinLib/Size.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Skins/SkinLib/Size.h')
-rw-r--r--plugins/Skins/SkinLib/Size.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/Skins/SkinLib/Size.h b/plugins/Skins/SkinLib/Size.h
new file mode 100644
index 0000000000..8c0a297aee
--- /dev/null
+++ b/plugins/Skins/SkinLib/Size.h
@@ -0,0 +1,27 @@
+#ifndef __SIZE_H__
+# define __SIZE_H__
+
+
+struct Size
+{
+ int x;
+ int y;
+
+ Size();
+ Size(int aX, int aY);
+
+ /// @return 0 on success
+ int resizeTo(int x, int y);
+
+ /// @return 0 on success
+ int fitInside(int maxSize);
+
+ /// @return 0 on success
+ int scaleTo(int size);
+
+ bool operator==(const Size &other) const;
+};
+
+
+
+#endif // __SIZE_H__