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 * | 4 * |
4 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
7 * 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. |
8 * | 9 * |
9 * 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, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 13 * Library General Public License for more details. |
(...skipping 20 matching lines...) Expand all Loading... |
33 | 34 |
34 namespace WebCore { | 35 namespace WebCore { |
35 | 36 |
36 class SVGFilter : public Filter { | 37 class SVGFilter : public Filter { |
37 public: | 38 public: |
38 static PassRefPtr<SVGFilter> create(const AffineTransform&, const FloatRect&
, const FloatRect&, const FloatRect&, bool); | 39 static PassRefPtr<SVGFilter> create(const AffineTransform&, const FloatRect&
, const FloatRect&, const FloatRect&, bool); |
39 | 40 |
40 FloatRect filterRegionInUserSpace() const { return m_filterRegion; } | 41 FloatRect filterRegionInUserSpace() const { return m_filterRegion; } |
41 virtual FloatRect filterRegion() const { return m_absoluteFilterRegion; } | 42 virtual FloatRect filterRegion() const { return m_absoluteFilterRegion; } |
42 | 43 |
43 virtual FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint& point) con
st { return m_absoluteTransform.inverse().mapPoint(point); } | |
44 const AffineTransform& absoluteTransform() const { return m_absoluteTransfor
m; } | |
45 | |
46 virtual float applyHorizontalScale(float value) const; | 44 virtual float applyHorizontalScale(float value) const; |
47 virtual float applyVerticalScale(float value) const; | 45 virtual float applyVerticalScale(float value) const; |
48 | 46 |
49 virtual FloatRect sourceImageRect() const { return m_absoluteSourceDrawingRe
gion; } | 47 virtual FloatRect sourceImageRect() const { return m_absoluteSourceDrawingRe
gion; } |
50 FloatRect targetBoundingBox() const { return m_targetBoundingBox; } | 48 FloatRect targetBoundingBox() const { return m_targetBoundingBox; } |
51 | 49 |
52 private: | 50 private: |
53 SVGFilter(const AffineTransform& absoluteTransform, const FloatRect& absolut
eSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filte
rRegion, bool effectBBoxMode); | 51 SVGFilter(const AffineTransform& absoluteTransform, const FloatRect& absolut
eSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filte
rRegion, bool effectBBoxMode); |
54 | 52 |
55 AffineTransform m_absoluteTransform; | |
56 FloatRect m_absoluteSourceDrawingRegion; | 53 FloatRect m_absoluteSourceDrawingRegion; |
57 FloatRect m_targetBoundingBox; | 54 FloatRect m_targetBoundingBox; |
58 FloatRect m_absoluteFilterRegion; | 55 FloatRect m_absoluteFilterRegion; |
59 FloatRect m_filterRegion; | 56 FloatRect m_filterRegion; |
60 bool m_effectBBoxMode; | 57 bool m_effectBBoxMode; |
61 }; | 58 }; |
62 | 59 |
63 } // namespace WebCore | 60 } // namespace WebCore |
64 | 61 |
65 #endif // ENABLE(SVG) | 62 #endif // ENABLE(SVG) |
66 | 63 |
67 #endif // SVGFilter_h | 64 #endif // SVGFilter_h |
OLD | NEW |