[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/graphics/okular/core
From:       Pino Toscano <toscano.pino () tiscali ! it>
Date:       2006-12-31 17:52:26
Message-ID: 1167587546.635678.26308.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 618237 by pino:

add handy debug operators for NormalizedPoint and NormalizedRect


 M  +12 -0     area.cpp  
 M  +3 -0      area.h  


--- trunk/playground/graphics/okular/core/area.cpp #618236:618237
@@ -41,6 +41,12 @@
     matrix.map( x, y, &x, &y );
 }
 
+kdbgstream& operator<<( kdbgstream& str, const Okular::NormalizedPoint& p )
+{
+    str << "NormPt(" << p.x << "," << p.y << ")";
+    return str;
+}
+
 /** class NormalizedRect **/
 
 NormalizedRect::NormalizedRect()
@@ -148,6 +154,12 @@
     bottom = rect.bottom();
 }
 
+kdbgstream& operator<<( kdbgstream& str, const Okular::NormalizedRect& r )
+{
+    str << "NormRect(" << r.left << "," << r.top << " x " << ( r.right - r.left ) << \
"+" << ( r.bottom - r.top ) << ")"; +    return str;
+}
+
 HighlightAreaRect::HighlightAreaRect( const RegularAreaRect *area )
     : RegularAreaRect(), s_id( -1 )
 {
--- trunk/playground/graphics/okular/core/area.h #618236:618237
@@ -542,4 +542,7 @@
 
 }
 
+OKULAR_EXPORT kdbgstream& operator<<( kdbgstream& str, const \
Okular::NormalizedPoint& p ); +OKULAR_EXPORT kdbgstream& operator<<( kdbgstream& str, \
const Okular::NormalizedRect& r ); +
 #endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic