OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 28 matching lines...) Expand all Loading... | |
39 static PassRefPtr<RotateTransformOperation> create(double x, double y, doubl e z, double angle, OperationType type) | 39 static PassRefPtr<RotateTransformOperation> create(double x, double y, doubl e z, double angle, OperationType type) |
40 { | 40 { |
41 return adoptRef(new RotateTransformOperation(x, y, z, angle, type)); | 41 return adoptRef(new RotateTransformOperation(x, y, z, angle, type)); |
42 } | 42 } |
43 | 43 |
44 double x() const { return m_x; } | 44 double x() const { return m_x; } |
45 double y() const { return m_y; } | 45 double y() const { return m_y; } |
46 double z() const { return m_z; } | 46 double z() const { return m_z; } |
47 double angle() const { return m_angle; } | 47 double angle() const { return m_angle; } |
48 | 48 |
49 bool hasZeroAxis() const; | |
Ian Vollick
2014/06/17 15:54:56
nit: now that you've got ::axis() below, maybe we
awoloszyn
2014/06/17 20:06:02
Done.
| |
50 FloatPoint3D axis() const; | |
51 static bool shareSameAxis(const RotateTransformOperation* fromRotation, cons t RotateTransformOperation* toRotation, FloatPoint3D* axis, double* fromAngle, d ouble* toAngle); | |
52 | |
53 virtual bool canInterpolateWith(const TransformOperation& other) const; | |
54 virtual OperationType type() const OVERRIDE { return m_type; } | |
55 | |
49 private: | 56 private: |
50 virtual bool isIdentity() const OVERRIDE { return !m_angle; } | 57 virtual bool isIdentity() const OVERRIDE { return !m_angle; } |
51 | 58 |
52 virtual OperationType type() const OVERRIDE { return m_type; } | |
53 | |
54 virtual bool operator==(const TransformOperation& o) const OVERRIDE | 59 virtual bool operator==(const TransformOperation& o) const OVERRIDE |
55 { | 60 { |
56 if (!isSameType(o)) | 61 if (!isSameType(o)) |
57 return false; | 62 return false; |
58 const RotateTransformOperation* r = static_cast<const RotateTransformOpe ration*>(&o); | 63 const RotateTransformOperation* r = static_cast<const RotateTransformOpe ration*>(&o); |
59 return m_x == r->m_x && m_y == r->m_y && m_z == r->m_z && m_angle == r-> m_angle; | 64 return m_x == r->m_x && m_y == r->m_y && m_z == r->m_z && m_angle == r-> m_angle; |
60 } | 65 } |
61 | 66 |
62 virtual void apply(TransformationMatrix& transform, const FloatSize& /*borde rBoxSize*/) const OVERRIDE | 67 virtual void apply(TransformationMatrix& transform, const FloatSize& /*borde rBoxSize*/) const OVERRIDE |
63 { | 68 { |
(...skipping 15 matching lines...) Expand all Loading... | |
79 double m_x; | 84 double m_x; |
80 double m_y; | 85 double m_y; |
81 double m_z; | 86 double m_z; |
82 double m_angle; | 87 double m_angle; |
83 OperationType m_type; | 88 OperationType m_type; |
84 }; | 89 }; |
85 | 90 |
86 } // namespace WebCore | 91 } // namespace WebCore |
87 | 92 |
88 #endif // RotateTransformOperation_h | 93 #endif // RotateTransformOperation_h |
OLD | NEW |