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

Unified Diff: ui/gfx/rect_base_impl.h

Issue 11086037: Revert 160976 - The center of a rect is x+width/2, y+height/2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/root_window_unittest.cc ('k') | ui/gfx/rect_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/rect_base_impl.h
===================================================================
--- ui/gfx/rect_base_impl.h (revision 160992)
+++ ui/gfx/rect_base_impl.h (working copy)
@@ -268,7 +268,7 @@
typename Type>
PointClass RectBase<Class, PointClass, SizeClass, InsetsClass, Type>::
CenterPoint() const {
- return PointClass(x() + width() / 2, y() + height() / 2);
+ return PointClass(x() + (width() - 1) / 2, y() + (height() - 1) / 2);
}
template<typename Class,
« no previous file with comments | « ui/aura/root_window_unittest.cc ('k') | ui/gfx/rect_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698