OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 // in most primitives are given in horizontal and vertical directions. | 54 // in most primitives are given in horizontal and vertical directions. |
55 ASSERT(!absoluteTransform.b() && !absoluteTransform.c()); | 55 ASSERT(!absoluteTransform.b() && !absoluteTransform.c()); |
56 m_absoluteTransform = absoluteTransform; | 56 m_absoluteTransform = absoluteTransform; |
57 m_inverseTransform = absoluteTransform.inverse(); | 57 m_inverseTransform = absoluteTransform.inverse(); |
58 m_absoluteFilterRegion = m_absoluteTransform.mapRect(m_filterRegion); | 58 m_absoluteFilterRegion = m_absoluteTransform.mapRect(m_filterRegion); |
59 } | 59 } |
60 FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint& point) const { ret urn m_inverseTransform.mapPoint(point); } | 60 FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint& point) const { ret urn m_inverseTransform.mapPoint(point); } |
61 FloatRect mapLocalRectToAbsoluteRect(const FloatRect& rect) const { return m _absoluteTransform.mapRect(rect); } | 61 FloatRect mapLocalRectToAbsoluteRect(const FloatRect& rect) const { return m _absoluteTransform.mapRect(rect); } |
62 FloatRect mapAbsoluteRectToLocalRect(const FloatRect& rect) const { return m _inverseTransform.mapRect(rect); } | 62 FloatRect mapAbsoluteRectToLocalRect(const FloatRect& rect) const { return m _inverseTransform.mapRect(rect); } |
63 | 63 |
64 virtual float applyHorizontalScale(float value) const | 64 virtual float applyHorizontalScale(const float value) const |
Stephen White
2014/03/27 04:11:53
I think these are just noise. Might just be my opi
Savago
2014/03/27 04:51:19
I agree, it is a left over where I tried to pass b
| |
65 { | 65 { |
66 return value * m_absoluteTransform.a(); | 66 return value * m_absoluteTransform.a(); |
67 } | 67 } |
68 virtual float applyVerticalScale(float value) const | 68 virtual float applyVerticalScale(const float value) const |
69 { | 69 { |
70 return value * m_absoluteTransform.d(); | 70 return value * m_absoluteTransform.d(); |
71 } | 71 } |
72 | 72 |
73 virtual IntRect sourceImageRect() const = 0; | 73 virtual IntRect sourceImageRect() const = 0; |
74 | 74 |
75 FloatRect absoluteFilterRegion() const { return m_absoluteFilterRegion; } | 75 FloatRect absoluteFilterRegion() const { return m_absoluteFilterRegion; } |
76 | 76 |
77 FloatRect filterRegion() const { return m_filterRegion; } | 77 FloatRect filterRegion() const { return m_filterRegion; } |
78 void setFilterRegion(const FloatRect& rect) | 78 void setFilterRegion(const FloatRect& rect) |
79 { | 79 { |
80 m_filterRegion = rect; | 80 m_filterRegion = rect; |
81 m_absoluteFilterRegion = m_absoluteTransform.mapRect(m_filterRegion); | 81 m_absoluteFilterRegion = m_absoluteTransform.mapRect(m_filterRegion); |
82 } | 82 } |
83 | 83 |
84 | 84 |
85 private: | 85 private: |
86 OwnPtr<ImageBuffer> m_sourceImage; | 86 OwnPtr<ImageBuffer> m_sourceImage; |
87 AffineTransform m_absoluteTransform; | 87 AffineTransform m_absoluteTransform; |
88 AffineTransform m_inverseTransform; | 88 AffineTransform m_inverseTransform; |
89 FloatRect m_absoluteFilterRegion; | 89 FloatRect m_absoluteFilterRegion; |
90 FloatRect m_filterRegion; | 90 FloatRect m_filterRegion; |
91 }; | 91 }; |
92 | 92 |
93 } // namespace WebCore | 93 } // namespace WebCore |
94 | 94 |
95 #endif // Filter_h | 95 #endif // Filter_h |
OLD | NEW |