| 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 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 float LayoutSVGResourceRadialGradient::focalRadius( | 60 float LayoutSVGResourceRadialGradient::focalRadius( |
| 61 const RadialGradientAttributes& attributes) const { | 61 const RadialGradientAttributes& attributes) const { |
| 62 return SVGLengthContext::resolveLength(element(), attributes.gradientUnits(), | 62 return SVGLengthContext::resolveLength(element(), attributes.gradientUnits(), |
| 63 *attributes.fr()); | 63 *attributes.fr()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 PassRefPtr<Gradient> LayoutSVGResourceRadialGradient::buildGradient() const { | 66 PassRefPtr<Gradient> LayoutSVGResourceRadialGradient::buildGradient() const { |
| 67 const RadialGradientAttributes& attributes = this->attributes(); | 67 const RadialGradientAttributes& attributes = this->attributes(); |
| 68 RefPtr<Gradient> gradient = | 68 RefPtr<Gradient> gradient = Gradient::create( |
| 69 Gradient::create(focalPoint(attributes), focalRadius(attributes), | 69 focalPoint(attributes), focalRadius(attributes), centerPoint(attributes), |
| 70 centerPoint(attributes), radius(attributes)); | 70 radius(attributes), 1, |
| 71 gradient->setSpreadMethod( | 71 platformSpreadMethodFromSVGType(attributes.spreadMethod()), |
| 72 platformSpreadMethodFromSVGType(attributes.spreadMethod())); | 72 Gradient::ColorInterpolation::Unpremultiplied); |
| 73 gradient->addColorStops(attributes.stops()); | 73 gradient->addColorStops(attributes.stops()); |
| 74 return gradient.release(); | 74 return gradient.release(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| OLD | NEW |