summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-01-11 21:56:48 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-11 21:56:48 +0000
commit7c0a92e1761dddaf6ed84e3bea723dc7a40c8685 (patch)
treeaf3fae8b8025d77faf9233e8f50d7663254c6c3e /core/fxcrt/fx_coordinates.cpp
parent923948632fe798d1c17000803d9d4b1559b4ffa1 (diff)
downloadpdfium-7c0a92e1761dddaf6ed84e3bea723dc7a40c8685.tar.xz
Add operator<< to CFX_FloatRect.
This helps debugging. Change-Id: I4d14dd5975d8d8f4566009ed4a4127f9c56d36dd Reviewed-on: https://pdfium-review.googlesource.com/22790 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_coordinates.cpp')
-rw-r--r--core/fxcrt/fx_coordinates.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fxcrt/fx_coordinates.cpp b/core/fxcrt/fx_coordinates.cpp
index db4bea945f..ac13a32329 100644
--- a/core/fxcrt/fx_coordinates.cpp
+++ b/core/fxcrt/fx_coordinates.cpp
@@ -199,6 +199,14 @@ FX_RECT CFX_FloatRect::ToRoundedFxRect() const {
FXSYS_round(bottom));
}
+#ifndef NDEBUG
+std::ostream& operator<<(std::ostream& os, const CFX_FloatRect& rect) {
+ os << "rect[" << rect.Width() << "x" << rect.Height() << " (" << rect.left
+ << ", " << rect.bottom << ")]";
+ return os;
+}
+#endif
+
CFX_Matrix CFX_Matrix::GetInverse() const {
CFX_Matrix inverse;
float i = a * d - b * c;