| OLD | NEW |
| 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 #include "ui/gfx/rect_f.h" | 5 #include "ui/gfx/rect_f.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "ui/gfx/insets_f.h" | 9 #include "ui/gfx/insets_f.h" |
| 10 #include "ui/gfx/rect_base_impl.h" | 10 #include "ui/gfx/rect_base_impl.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 | 13 |
| 14 template class RectBase<RectF, PointF, SizeF, InsetsF, float>; | 14 template class RectBase<RectF, PointF, SizeF, InsetsF, Vector2dF, float>; |
| 15 | 15 |
| 16 typedef class RectBase<RectF, PointF, SizeF, InsetsF, float> RectBaseT; | 16 typedef class RectBase<RectF, PointF, SizeF, InsetsF, Vector2dF, |
| 17 float> RectBaseT; |
| 17 | 18 |
| 18 RectF::RectF() : RectBaseT(gfx::SizeF()) { | 19 RectF::RectF() : RectBaseT(gfx::SizeF()) { |
| 19 } | 20 } |
| 20 | 21 |
| 21 RectF::RectF(float width, float height) | 22 RectF::RectF(float width, float height) |
| 22 : RectBaseT(gfx::SizeF(width, height)) { | 23 : RectBaseT(gfx::SizeF(width, height)) { |
| 23 } | 24 } |
| 24 | 25 |
| 25 RectF::RectF(float x, float y, float width, float height) | 26 RectF::RectF(float x, float y, float width, float height) |
| 26 : RectBaseT(gfx::PointF(x, y), gfx::SizeF(width, height)) { | 27 : RectBaseT(gfx::PointF(x, y), gfx::SizeF(width, height)) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return result; | 61 return result; |
| 61 } | 62 } |
| 62 | 63 |
| 63 RectF ScaleRect(const RectF& r, float x_scale, float y_scale) { | 64 RectF ScaleRect(const RectF& r, float x_scale, float y_scale) { |
| 64 RectF result = r; | 65 RectF result = r; |
| 65 result.Scale(x_scale, y_scale); | 66 result.Scale(x_scale, y_scale); |
| 66 return result; | 67 return result; |
| 67 } | 68 } |
| 68 | 69 |
| 69 } // namespace gfx | 70 } // namespace gfx |
| OLD | NEW |