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

Unified Diff: ui/gfx/geometry/insets.h

Issue 102253009: gfx: Add an implicit Insets to InsetsF conversion operator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/insets.h
diff --git a/ui/gfx/geometry/insets.h b/ui/gfx/geometry/insets.h
index 94fb2ef3bdc4a763cce94ff473bebd81be7e7c85..d9eaed4124cab3b79fea11bfdc29e424fe85ea44 100644
--- a/ui/gfx/geometry/insets.h
+++ b/ui/gfx/geometry/insets.h
@@ -9,6 +9,7 @@
#include "build/build_config.h"
#include "ui/gfx/geometry/insets_base.h"
+#include "ui/gfx/geometry/insets_f.h"
#include "ui/gfx/gfx_export.h"
#if defined(TOOLKIT_GTK)
@@ -39,6 +40,10 @@ class GFX_EXPORT Insets : public InsetsBase<Insets, int> {
static_cast<int>(right() * x_scale));
}
+ operator InsetsF() const {
+ return InsetsF(top(), left(), bottom(), right());
+ }
+
// Returns a string representation of the insets.
std::string ToString() const;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698