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

Side by Side Diff: ui/gfx/quad_f.h

Issue 12250019: Removed gfx::QuadF::operator =(const gfx::QuadF&) and let the compiler generate one (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | ui/gfx/quad_f.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_QUAD_F_H_ 5 #ifndef UI_GFX_QUAD_F_H_
6 #define UI_GFX_QUAD_F_H_ 6 #define UI_GFX_QUAD_F_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ui/base/ui_export.h" 10 #include "ui/base/ui_export.h"
(...skipping 12 matching lines...) Expand all
23 p2_(p2), 23 p2_(p2),
24 p3_(p3), 24 p3_(p3),
25 p4_(p4) {} 25 p4_(p4) {}
26 26
27 explicit QuadF(const RectF& rect) 27 explicit QuadF(const RectF& rect)
28 : p1_(rect.x(), rect.y()), 28 : p1_(rect.x(), rect.y()),
29 p2_(rect.right(), rect.y()), 29 p2_(rect.right(), rect.y()),
30 p3_(rect.right(), rect.bottom()), 30 p3_(rect.right(), rect.bottom()),
31 p4_(rect.x(), rect.bottom()) {} 31 p4_(rect.x(), rect.bottom()) {}
32 32
33 void operator=(const QuadF& quad);
34 void operator=(const RectF& rect); 33 void operator=(const RectF& rect);
35 34
36 void set_p1(const PointF& p) { p1_ = p; } 35 void set_p1(const PointF& p) { p1_ = p; }
37 void set_p2(const PointF& p) { p2_ = p; } 36 void set_p2(const PointF& p) { p2_ = p; }
38 void set_p3(const PointF& p) { p3_ = p; } 37 void set_p3(const PointF& p) { p3_ = p; }
39 void set_p4(const PointF& p) { p4_ = p; } 38 void set_p4(const PointF& p) { p4_ = p; }
40 39
41 const PointF& p1() const { return p1_; } 40 const PointF& p1() const { return p1_; }
42 const PointF& p2() const { return p2_; } 41 const PointF& p2() const { return p2_; }
43 const PointF& p3() const { return p3_; } 42 const PointF& p3() const { return p3_; }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 92
94 // Add a vector to a quad, offseting each point in the quad by the vector. 93 // Add a vector to a quad, offseting each point in the quad by the vector.
95 UI_EXPORT QuadF operator+(const QuadF& lhs, const Vector2dF& rhs); 94 UI_EXPORT QuadF operator+(const QuadF& lhs, const Vector2dF& rhs);
96 // Subtract a vector from a quad, offseting each point in the quad by the 95 // Subtract a vector from a quad, offseting each point in the quad by the
97 // inverse of the vector. 96 // inverse of the vector.
98 UI_EXPORT QuadF operator-(const QuadF& lhs, const Vector2dF& rhs); 97 UI_EXPORT QuadF operator-(const QuadF& lhs, const Vector2dF& rhs);
99 98
100 } // namespace gfx 99 } // namespace gfx
101 100
102 #endif // UI_GFX_QUAD_F_H_ 101 #endif // UI_GFX_QUAD_F_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/quad_f.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698