OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 | 117 |
118 static void setGradientAttributes(SVGGradientElement* element, LinearGradientAtt
ributes& attributes, bool isLinear = true) | 118 static void setGradientAttributes(SVGGradientElement* element, LinearGradientAtt
ributes& attributes, bool isLinear = true) |
119 { | 119 { |
120 if (!attributes.hasSpreadMethod() && element->spreadMethodSpecified()) | 120 if (!attributes.hasSpreadMethod() && element->spreadMethodSpecified()) |
121 attributes.setSpreadMethod(element->spreadMethodCurrentValue()); | 121 attributes.setSpreadMethod(element->spreadMethodCurrentValue()); |
122 | 122 |
123 if (!attributes.hasGradientUnits() && element->gradientUnitsSpecified()) | 123 if (!attributes.hasGradientUnits() && element->gradientUnitsSpecified()) |
124 attributes.setGradientUnits(element->gradientUnitsCurrentValue()); | 124 attributes.setGradientUnits(element->gradientUnitsCurrentValue()); |
125 | 125 |
126 if (!attributes.hasGradientTransform() && element->gradientTransformSpecifie
d()) { | 126 if (!attributes.hasGradientTransform() && element->gradientTransform()->isSp
ecified()) { |
127 AffineTransform transform; | 127 AffineTransform transform; |
128 element->gradientTransformCurrentValue().concatenate(transform); | 128 element->gradientTransform()->currentValue()->concatenate(transform); |
129 attributes.setGradientTransform(transform); | 129 attributes.setGradientTransform(transform); |
130 } | 130 } |
131 | 131 |
132 if (!attributes.hasStops()) { | 132 if (!attributes.hasStops()) { |
133 const Vector<Gradient::ColorStop>& stops(element->buildStops()); | 133 const Vector<Gradient::ColorStop>& stops(element->buildStops()); |
134 if (!stops.isEmpty()) | 134 if (!stops.isEmpty()) |
135 attributes.setStops(stops); | 135 attributes.setStops(stops); |
136 } | 136 } |
137 | 137 |
138 if (isLinear) { | 138 if (isLinear) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 bool SVGLinearGradientElement::selfHasRelativeLengths() const | 190 bool SVGLinearGradientElement::selfHasRelativeLengths() const |
191 { | 191 { |
192 return m_x1->currentValue()->isRelative() | 192 return m_x1->currentValue()->isRelative() |
193 || m_y1->currentValue()->isRelative() | 193 || m_y1->currentValue()->isRelative() |
194 || m_x2->currentValue()->isRelative() | 194 || m_x2->currentValue()->isRelative() |
195 || m_y2->currentValue()->isRelative(); | 195 || m_y2->currentValue()->isRelative(); |
196 } | 196 } |
197 | 197 |
198 } | 198 } |
OLD | NEW |