diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-15 21:46:11 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-15 21:46:11 +0200 |
commit | 679147eead574d186ebf3069647b4c23e8ccace6 (patch) | |
tree | fc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/ui/gfx/size_conversions.h | |
download | qtwebengine-chromium-679147eead574d186ebf3069647b4c23e8ccace6.tar.gz |
Initial import.
Diffstat (limited to 'chromium/ui/gfx/size_conversions.h')
-rw-r--r-- | chromium/ui/gfx/size_conversions.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chromium/ui/gfx/size_conversions.h b/chromium/ui/gfx/size_conversions.h new file mode 100644 index 00000000000..f642c4cc7cf --- /dev/null +++ b/chromium/ui/gfx/size_conversions.h @@ -0,0 +1,24 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_GFX_SIZE_CONVERSIONS_H_ +#define UI_GFX_SIZE_CONVERSIONS_H_ + +#include "ui/gfx/size.h" +#include "ui/gfx/size_f.h" + +namespace gfx { + +// Returns a Size with each component from the input SizeF floored. +UI_EXPORT Size ToFlooredSize(const SizeF& size); + +// Returns a Size with each component from the input SizeF ceiled. +UI_EXPORT Size ToCeiledSize(const SizeF& size); + +// Returns a Size with each component from the input SizeF rounded. +UI_EXPORT Size ToRoundedSize(const SizeF& size); + +} // namespace gfx + +#endif // UI_GFX_SIZE_CONVERSIONS_H_ |