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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 TransformOperations(const EmptyTransformOperations&) {} | 46 TransformOperations(const EmptyTransformOperations&) {} |
47 | 47 |
48 bool operator==(const TransformOperations& o) const; | 48 bool operator==(const TransformOperations& o) const; |
49 bool operator!=(const TransformOperations& o) const { return !(*this == o); } | 49 bool operator!=(const TransformOperations& o) const { return !(*this == o); } |
50 | 50 |
51 void apply(const FloatSize& sz, TransformationMatrix& t) const { | 51 void apply(const FloatSize& sz, TransformationMatrix& t) const { |
52 for (unsigned i = 0; i < m_operations.size(); ++i) | 52 for (unsigned i = 0; i < m_operations.size(); ++i) |
53 m_operations[i]->apply(t, sz); | 53 m_operations[i]->apply(t, sz); |
54 } | 54 } |
55 | 55 |
56 // Return true if any of the operation types are 3D operation types (even if t
he | 56 // Return true if any of the operation types are 3D operation types (even if |
57 // values describe affine transforms) | 57 // the values describe affine transforms) |
58 bool has3DOperation() const { | 58 bool has3DOperation() const { |
59 for (unsigned i = 0; i < m_operations.size(); ++i) | 59 for (unsigned i = 0; i < m_operations.size(); ++i) |
60 if (m_operations[i]->is3DOperation()) | 60 if (m_operations[i]->is3DOperation()) |
61 return true; | 61 return true; |
62 return false; | 62 return false; |
63 } | 63 } |
64 | 64 |
65 bool dependsOnBoxSize() const { | 65 bool dependsOnBoxSize() const { |
66 for (unsigned i = 0; i < m_operations.size(); ++i) { | 66 for (unsigned i = 0; i < m_operations.size(); ++i) { |
67 if (m_operations[i]->dependsOnBoxSize()) | 67 if (m_operations[i]->dependsOnBoxSize()) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 TransformOperations add(const TransformOperations& addend) const; | 99 TransformOperations add(const TransformOperations& addend) const; |
100 TransformOperations zoom(double factor) const; | 100 TransformOperations zoom(double factor) const; |
101 | 101 |
102 private: | 102 private: |
103 Vector<RefPtr<TransformOperation>> m_operations; | 103 Vector<RefPtr<TransformOperation>> m_operations; |
104 }; | 104 }; |
105 | 105 |
106 } // namespace blink | 106 } // namespace blink |
107 | 107 |
108 #endif // TransformOperations_h | 108 #endif // TransformOperations_h |
OLD | NEW |