| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef TransformPaintProperty_h |
| 6 #define TransformPaintProperty_h |
| 7 |
| 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/geometry/FloatPoint3D.h" |
| 10 #include "platform/transforms/TransformationMatrix.h" |
| 11 |
| 12 #include <iosfwd> |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 // A transform created by a css property such as "transform" or "perspective" |
| 17 // along with an index for the parent transform property that this transform is |
| 18 // relative to (or 0 for the root transform). |
| 19 class PLATFORM_EXPORT TransformPaintProperty { |
| 20 public: |
| 21 TransformPaintProperty(const TransformationMatrix& matrix, const FloatPoint3
D& origin, size_t parentIndex) |
| 22 : m_matrix(matrix), m_origin(origin), m_parentIndex(parentIndex) { }; |
| 23 |
| 24 const TransformationMatrix& matrix() const { return m_matrix; } |
| 25 const FloatPoint3D& origin() const { return m_origin; } |
| 26 |
| 27 // Parent index in the Vector that owns transform paint properties. |
| 28 size_t parentIndex() const { return m_parentIndex; } |
| 29 |
| 30 private: |
| 31 const TransformationMatrix m_matrix; |
| 32 const FloatPoint3D m_origin; |
| 33 const size_t m_parentIndex; |
| 34 }; |
| 35 |
| 36 // Redeclared here to avoid ODR issues. |
| 37 // See platform/testing/PaintPrinters.h. |
| 38 void PrintTo(const TransformPaintProperty&, std::ostream*); |
| 39 |
| 40 } // namespace blink |
| 41 |
| 42 #endif // TransformPaintProperty_h |
| OLD | NEW |