diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-05-01 14:51:01 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-05-02 14:47:26 +0300 |
commit | cbf423f83334b9c623f66b0aeb41889bc2d4e69c (patch) | |
tree | 608fa161ca378e4c2dfa1189ab5733ee6e04a150 | |
parent | ffeb6ce67735c59d90398e6e1fb47ad3022b7d5d (diff) |
rect: add rect_debug
-rw-r--r-- | common/rect.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h index a9c1b08..f8bacf1 100644 --- a/common/rect.h +++ b/common/rect.h @@ -21,6 +21,7 @@ #include <spice/macros.h> #include "draw.h" +#include "log.h" SPICE_BEGIN_DECLS @@ -85,6 +86,11 @@ static INLINE int rect_get_area(const SpiceRect *r) return (r->right - r->left) * (r->bottom - r->top); } +static INLINE void rect_debug(const SpiceRect *r) +{ + spice_debug("(%d, %d) (%d, %d)", r->left, r->top, r->right, r->bottom); +} + SPICE_END_DECLS #ifdef __cplusplus @@ -134,6 +140,11 @@ static inline int rect_get_area(const SpiceRect& r) return rect_get_area(&r); } +static inline void rect_debug(const SpiceRect &r) +{ + rect_debug(&r); +} + #endif /* __cplusplus */ #endif |