Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: ui/gfx/geometry/box_f.h

Issue 368903003: Provide gtest printers for ui/gfx geometry types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing gfx_test_support deps Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_GEOMETRY_BOX_F_H_ 5 #ifndef UI_GFX_GEOMETRY_BOX_F_H_
6 #define UI_GFX_GEOMETRY_BOX_F_H_ 6 #define UI_GFX_GEOMETRY_BOX_F_H_
7 7
8 #include <iosfwd>
9 #include <string>
10
8 #include "ui/gfx/geometry/point3_f.h" 11 #include "ui/gfx/geometry/point3_f.h"
9 #include "ui/gfx/geometry/vector3d_f.h" 12 #include "ui/gfx/geometry/vector3d_f.h"
10 13
11 namespace gfx { 14 namespace gfx {
12 15
13 // A 3d version of gfx::RectF, with the positive z-axis pointed towards 16 // A 3d version of gfx::RectF, with the positive z-axis pointed towards
14 // the camera. 17 // the camera.
15 class GFX_EXPORT BoxF { 18 class GFX_EXPORT BoxF {
16 public: 19 public:
17 BoxF() 20 BoxF()
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 151
149 inline BoxF operator+(const BoxF& b, const Vector3dF& v) { 152 inline BoxF operator+(const BoxF& b, const Vector3dF& v) {
150 return BoxF(b.x() + v.x(), 153 return BoxF(b.x() + v.x(),
151 b.y() + v.y(), 154 b.y() + v.y(),
152 b.z() + v.z(), 155 b.z() + v.z(),
153 b.width(), 156 b.width(),
154 b.height(), 157 b.height(),
155 b.depth()); 158 b.depth());
156 } 159 }
157 160
161 // This is declared here for use in gtest-based unit tests but is defined in
162 // the gfx_test_support target. Depend on that to use this in your unit test.
163 // This should not be used in production code - call ToString() instead.
164 void PrintTo(const BoxF& box, ::std::ostream* os);
danakj 2014/07/07 18:52:27 can we forward-declare std::ostream instead of inc
jamesr 2014/07/07 19:37:25 We are - the <iosfwd> header has forward declarati
danakj 2014/07/07 19:40:05 Ooh, cool. #til
165
158 } // namespace gfx 166 } // namespace gfx
159 167
160 #endif // UI_GFX_GEOMETRY_BOX_F_H_ 168 #endif // UI_GFX_GEOMETRY_BOX_F_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698