summaryrefslogtreecommitdiffstats
path: root/ui/gfx/interpolated_transform.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-31 05:15:43 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-31 05:15:43 +0000
commit2771b1c10df9718860f95e8674914d9e0b490a06 (patch)
treeb4716dd235d9b9ed6e5d7ef5ebc7228d54a67125 /ui/gfx/interpolated_transform.h
parenta692d1340352d1ed6a8612fe2ad125be300c278a (diff)
downloadchromium_src-2771b1c10df9718860f95e8674914d9e0b490a06.zip
chromium_src-2771b1c10df9718860f95e8674914d9e0b490a06.tar.gz
chromium_src-2771b1c10df9718860f95e8674914d9e0b490a06.tar.bz2
ui: Remove implicit flooring from Point3f and rename the class to Point3F
The Point3F::AsPoint() method converts from float to integer by doing an implicit floor() on the values. Instead, we should have AsPointF() return floating point values, and use the ToFlooredPoint() conversion method to explicitly floor the values at the call-site if desired. Also, move the point3.h header to point3_f.h so that it is consistent with other geometry header file namings. BUG=147395 R=sky Review URL: https://chromiumcodereview.appspot.com/11301043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/interpolated_transform.h')
-rw-r--r--ui/gfx/interpolated_transform.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/ui/gfx/interpolated_transform.h b/ui/gfx/interpolated_transform.h
index 097c2b1..979eedf 100644
--- a/ui/gfx/interpolated_transform.h
+++ b/ui/gfx/interpolated_transform.h
@@ -8,7 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/point.h"
-#include "ui/gfx/point3.h"
+#include "ui/gfx/point3_f.h"
#include "ui/gfx/transform.h"
namespace ui {
@@ -49,7 +49,7 @@ class UI_EXPORT InterpolatedTransform {
static bool FactorTRS(const gfx::Transform& transform,
gfx::Point* translation,
float* rotation,
- gfx::Point3f* scale);
+ gfx::Point3F* scale);
protected:
// Calculates the interpolated transform without considering our child.
@@ -114,10 +114,10 @@ class UI_EXPORT InterpolatedRotation : public InterpolatedTransform {
///////////////////////////////////////////////////////////////////////////////
class UI_EXPORT InterpolatedAxisAngleRotation : public InterpolatedTransform {
public:
- InterpolatedAxisAngleRotation(gfx::Point3f axis,
+ InterpolatedAxisAngleRotation(gfx::Point3F axis,
float start_degrees,
float end_degrees);
- InterpolatedAxisAngleRotation(gfx::Point3f axis,
+ InterpolatedAxisAngleRotation(gfx::Point3F axis,
float start_degrees,
float end_degrees,
float start_time,
@@ -128,7 +128,7 @@ class UI_EXPORT InterpolatedAxisAngleRotation : public InterpolatedTransform {
virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
private:
- gfx::Point3f axis_;
+ gfx::Point3F axis_;
const float start_degrees_;
const float end_degrees_;
@@ -146,10 +146,10 @@ class UI_EXPORT InterpolatedScale : public InterpolatedTransform {
InterpolatedScale(float start_scale, float end_scale);
InterpolatedScale(float start_scale, float end_scale,
float start_time, float end_time);
- InterpolatedScale(const gfx::Point3f& start_scale,
- const gfx::Point3f& end_scale);
- InterpolatedScale(const gfx::Point3f& start_scale,
- const gfx::Point3f& end_scale,
+ InterpolatedScale(const gfx::Point3F& start_scale,
+ const gfx::Point3F& end_scale);
+ InterpolatedScale(const gfx::Point3F& start_scale,
+ const gfx::Point3F& end_scale,
float start_time,
float end_time);
virtual ~InterpolatedScale();
@@ -158,8 +158,8 @@ class UI_EXPORT InterpolatedScale : public InterpolatedTransform {
virtual gfx::Transform InterpolateButDoNotCompose(float t) const OVERRIDE;
private:
- const gfx::Point3f start_scale_;
- const gfx::Point3f end_scale_;
+ const gfx::Point3F start_scale_;
+ const gfx::Point3F end_scale_;
DISALLOW_COPY_AND_ASSIGN(InterpolatedScale);
};