summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_coordinates.h')
-rw-r--r--core/fxcrt/fx_coordinates.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index 3d09652b13..2e8c1abca3 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -581,6 +581,16 @@ class CFX_RTemplate {
using CFX_Rect = CFX_RTemplate<int32_t>;
using CFX_RectF = CFX_RTemplate<float>;
+#ifndef NDEBUG
+template <class BaseType>
+std::ostream& operator<<(std::ostream& os,
+ const CFX_RTemplate<BaseType>& rect) {
+ os << "rect[w " << rect.Width() << " x h " << rect.Height() << " (left "
+ << rect.left << ", top " << rect.top << ")]";
+ return os;
+}
+#endif // NDEBUG
+
// The matrix is of the form:
// | a b 0 |
// | c d 0 |