diff options
Diffstat (limited to 'chromium/ui/gfx/point_conversions.h')
-rw-r--r-- | chromium/ui/gfx/point_conversions.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chromium/ui/gfx/point_conversions.h b/chromium/ui/gfx/point_conversions.h new file mode 100644 index 00000000000..9467a9231dc --- /dev/null +++ b/chromium/ui/gfx/point_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_POINT_CONVERSIONS_H_ +#define UI_GFX_POINT_CONVERSIONS_H_ + +#include "ui/gfx/point.h" +#include "ui/gfx/point_f.h" + +namespace gfx { + +// Returns a Point with each component from the input PointF floored. +UI_EXPORT Point ToFlooredPoint(const PointF& point); + +// Returns a Point with each component from the input PointF ceiled. +UI_EXPORT Point ToCeiledPoint(const PointF& point); + +// Returns a Point with each component from the input PointF rounded. +UI_EXPORT Point ToRoundedPoint(const PointF& point); + +} // namespace gfx + +#endif // UI_GFX_POINT_CONVERSIONS_H_ |