OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. 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 29 matching lines...) Expand all Loading... |
40 static const LayoutSVGResourceType s_resourceType = | 40 static const LayoutSVGResourceType s_resourceType = |
41 RadialGradientResourceType; | 41 RadialGradientResourceType; |
42 LayoutSVGResourceType resourceType() const override { return s_resourceType; } | 42 LayoutSVGResourceType resourceType() const override { return s_resourceType; } |
43 | 43 |
44 SVGUnitTypes::SVGUnitType gradientUnits() const override { | 44 SVGUnitTypes::SVGUnitType gradientUnits() const override { |
45 return attributes().gradientUnits(); | 45 return attributes().gradientUnits(); |
46 } | 46 } |
47 AffineTransform calculateGradientTransform() const override { | 47 AffineTransform calculateGradientTransform() const override { |
48 return attributes().gradientTransform(); | 48 return attributes().gradientTransform(); |
49 } | 49 } |
50 bool collectGradientAttributes(SVGGradientElement*) override; | 50 bool collectGradientAttributes() override; |
51 PassRefPtr<Gradient> buildGradient() const override; | 51 PassRefPtr<Gradient> buildGradient() const override; |
52 | 52 |
53 FloatPoint centerPoint(const RadialGradientAttributes&) const; | 53 FloatPoint centerPoint(const RadialGradientAttributes&) const; |
54 FloatPoint focalPoint(const RadialGradientAttributes&) const; | 54 FloatPoint focalPoint(const RadialGradientAttributes&) const; |
55 float radius(const RadialGradientAttributes&) const; | 55 float radius(const RadialGradientAttributes&) const; |
56 float focalRadius(const RadialGradientAttributes&) const; | 56 float focalRadius(const RadialGradientAttributes&) const; |
57 | 57 |
58 private: | 58 private: |
59 Persistent<RadialGradientAttributesWrapper> m_attributesWrapper; | 59 Persistent<RadialGradientAttributesWrapper> m_attributesWrapper; |
60 | 60 |
61 RadialGradientAttributes& mutableAttributes() { | 61 RadialGradientAttributes& mutableAttributes() { |
62 return m_attributesWrapper->attributes(); | 62 return m_attributesWrapper->attributes(); |
63 } | 63 } |
64 const RadialGradientAttributes& attributes() const { | 64 const RadialGradientAttributes& attributes() const { |
65 return m_attributesWrapper->attributes(); | 65 return m_attributesWrapper->attributes(); |
66 } | 66 } |
67 }; | 67 }; |
68 | 68 |
69 DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(LayoutSVGResourceRadialGradient, | 69 DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(LayoutSVGResourceRadialGradient, |
70 RadialGradientResourceType); | 70 RadialGradientResourceType); |
71 | 71 |
72 } // namespace blink | 72 } // namespace blink |
73 | 73 |
74 #endif | 74 #endif |
OLD | NEW |