OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 23 matching lines...) Expand all Loading... |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class SVGFilter : public Filter { | 36 class SVGFilter : public Filter { |
37 public: | 37 public: |
38 static PassRefPtr<SVGFilter> create(const AffineTransform&, const FloatRect&
, const FloatRect&, const FloatRect&, bool); | 38 static PassRefPtr<SVGFilter> create(const AffineTransform&, const FloatRect&
, const FloatRect&, const FloatRect&, bool); |
39 | 39 |
40 FloatRect filterRegionInUserSpace() const { return m_filterRegion; } | 40 FloatRect filterRegionInUserSpace() const { return m_filterRegion; } |
41 virtual FloatRect filterRegion() const { return m_absoluteFilterRegion; } | 41 virtual FloatRect filterRegion() const { return m_absoluteFilterRegion; } |
42 | 42 |
43 virtual FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint& point) con
st { return m_absoluteTransform.inverse().mapPoint(point); } | 43 virtual FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint& point) con
st { return m_absoluteTransform.inverse().mapPoint(point); } |
44 FloatRect mapLocalRectToAbsoluteRect(const FloatRect& rect) const { return m
_absoluteTransform.mapRect(rect); } | 44 const AffineTransform& absoluteTransform() const { return m_absoluteTransfor
m; } |
45 | 45 |
46 virtual float applyHorizontalScale(float value) const; | 46 virtual float applyHorizontalScale(float value) const; |
47 virtual float applyVerticalScale(float value) const; | 47 virtual float applyVerticalScale(float value) const; |
48 | 48 |
49 virtual FloatRect sourceImageRect() const { return m_absoluteSourceDrawingRe
gion; } | 49 virtual FloatRect sourceImageRect() const { return m_absoluteSourceDrawingRe
gion; } |
50 FloatRect targetBoundingBox() const { return m_targetBoundingBox; } | 50 FloatRect targetBoundingBox() const { return m_targetBoundingBox; } |
51 | 51 |
52 private: | 52 private: |
53 SVGFilter(const AffineTransform& absoluteTransform, const FloatRect& absolut
eSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filte
rRegion, bool effectBBoxMode); | 53 SVGFilter(const AffineTransform& absoluteTransform, const FloatRect& absolut
eSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filte
rRegion, bool effectBBoxMode); |
54 | 54 |
55 AffineTransform m_absoluteTransform; | 55 AffineTransform m_absoluteTransform; |
56 FloatRect m_absoluteSourceDrawingRegion; | 56 FloatRect m_absoluteSourceDrawingRegion; |
57 FloatRect m_targetBoundingBox; | 57 FloatRect m_targetBoundingBox; |
58 FloatRect m_absoluteFilterRegion; | 58 FloatRect m_absoluteFilterRegion; |
59 FloatRect m_filterRegion; | 59 FloatRect m_filterRegion; |
60 bool m_effectBBoxMode; | 60 bool m_effectBBoxMode; |
61 }; | 61 }; |
62 | 62 |
63 } // namespace WebCore | 63 } // namespace WebCore |
64 | 64 |
65 #endif // ENABLE(SVG) && ENABLE(FILTERS) | 65 #endif // ENABLE(SVG) && ENABLE(FILTERS) |
66 | 66 |
67 #endif // SVGFilter_h | 67 #endif // SVGFilter_h |
OLD | NEW |