mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2025-12-26 14:18:36 +00:00
rect: add rect_debug
This commit is contained in:
parent
ffeb6ce677
commit
cbf423f833
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user