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

Unified Diff: ui/gfx/rect_base_impl.h

Issue 11065050: 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
Index: ui/gfx/rect_base_impl.h
diff --git a/ui/gfx/rect_base_impl.h b/ui/gfx/rect_base_impl.h
index 84caa7692f62c5b617bae1a05d50ac9d9786ae54..d592fde37c448548a90994504932ff8261103741 100644
--- a/ui/gfx/rect_base_impl.h
+++ b/ui/gfx/rect_base_impl.h
@@ -268,7 +268,7 @@ template<typename Class,
typename Type>
PointClass RectBase<Class, PointClass, SizeClass, InsetsClass, Type>::
CenterPoint() const {
- return PointClass(x() + (width() - 1) / 2, y() + (height() - 1) / 2);
+ return PointClass(x() + width() / 2, y() + height() / 2);
}
template<typename Class,

Powered by Google App Engine
This is Rietveld 408576698