aboutsummaryrefslogtreecommitdiff
path: root/lib/gdi/erect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gdi/erect.cpp')
-rw-r--r--lib/gdi/erect.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/gdi/erect.cpp b/lib/gdi/erect.cpp
index 43cefc53..c17c5cf3 100644
--- a/lib/gdi/erect.cpp
+++ b/lib/gdi/erect.cpp
@@ -1,4 +1,5 @@
#include <lib/gdi/erect.h>
+#include <lib/base/eerror.h>
/*****************************************************************************
eRect member functions
@@ -201,3 +202,13 @@ bool operator!=( const eRect &r1, const eRect &r2 )
{
return r1.x1!=r2.x1 || r1.x2!=r2.x2 || r1.y1!=r2.y1 || r1.y2!=r2.y2;
}
+
+void eRect::scale(int x_n, int x_d, int y_n, int y_d)
+{
+ ASSERT(x_d); ASSERT(y_d);
+ x1 *= x_n; x1 /= x_d;
+ x2 *= x_n; x2 /= x_d;
+ y1 *= y_n; y1 /= y_d;
+ y2 *= y_n; y2 /= y_d;
+}
+