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

Unified Diff: ui/gfx/size.h

Issue 10993094: Make adding and subtracting gfx:: point types simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/gfx/rect.h ('k') | ui/gfx/size_f.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/size.h
diff --git a/ui/gfx/size.h b/ui/gfx/size.h
index 2d01eeea5004f53893d214c3c3915b113ad84050..8a53b97edbcc6c55a0b6ac7bb7de18fdf9a39e56 100644
--- a/ui/gfx/size.h
+++ b/ui/gfx/size.h
@@ -10,6 +10,7 @@
#include "build/build_config.h"
#include "ui/base/ui_export.h"
#include "ui/gfx/size_base.h"
+#include "ui/gfx/size_f.h"
#if defined(OS_WIN)
typedef struct tagSIZE SIZE;
@@ -42,6 +43,10 @@ class UI_EXPORT Size : public SizeBase<Size, int> {
CGSize ToCGSize() const;
#endif
+ SizeF ToSizeF() const {
+ return SizeF(width(), height());
+ }
+
std::string ToString() const;
};
« no previous file with comments | « ui/gfx/rect.h ('k') | ui/gfx/size_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698