Commit 6d2e7c95 authored by sadrul@chromium.org's avatar sadrul@chromium.org

gfx: Add an implicit Insets to InsetsF conversion operator.

BUG=none
R=danakj@chromium.org

Review URL: https://codereview.chromium.org/102253009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243131 0039d316-1c4b-4281-b951-d872f2087c98
parent b04cefb8
......@@ -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;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment