Merge branch 'bug_300_fix_arabic'
[enigma2.git] / lib / gdi / erect.cpp
index b72e5d04bdb6e075df2d6e1f4f26edf5ae5cde01..c17c5cf330541db62283c7f79a896c4b927e07f1 100644 (file)
@@ -1,5 +1,5 @@
 #include <lib/gdi/erect.h>
-#include <iostream>
+#include <lib/base/eerror.h>
 
 /*****************************************************************************
   eRect member functions
@@ -151,8 +151,8 @@ eRect& eRect::operator&=(const eRect &r)
 
 eRect eRect::operator|(const eRect &r) const
 {
-       if ( isValid() ) {
-       if ( r.isValid() ) {
+       if ( valid() ) {
+       if ( r.valid() ) {
                eRect tmp;
                tmp.setLeft(   MIN( x1, r.x1 ) );
                tmp.setRight(  MAX( x2, r.x2 ) );
@@ -202,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; 
+}
+