| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 | 46 |
| 47 FloatPoint LayoutSVGResourceLinearGradient::endPoint( | 47 FloatPoint LayoutSVGResourceLinearGradient::endPoint( |
| 48 const LinearGradientAttributes& attributes) const { | 48 const LinearGradientAttributes& attributes) const { |
| 49 return SVGLengthContext::resolvePoint(element(), attributes.gradientUnits(), | 49 return SVGLengthContext::resolvePoint(element(), attributes.gradientUnits(), |
| 50 *attributes.x2(), *attributes.y2()); | 50 *attributes.x2(), *attributes.y2()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 PassRefPtr<Gradient> LayoutSVGResourceLinearGradient::buildGradient() const { | 53 PassRefPtr<Gradient> LayoutSVGResourceLinearGradient::buildGradient() const { |
| 54 const LinearGradientAttributes& attributes = this->attributes(); | 54 const LinearGradientAttributes& attributes = this->attributes(); |
| 55 RefPtr<Gradient> gradient = | 55 RefPtr<Gradient> gradient = Gradient::create( |
| 56 Gradient::create(startPoint(attributes), endPoint(attributes)); | 56 startPoint(attributes), endPoint(attributes), |
| 57 gradient->setSpreadMethod( | 57 platformSpreadMethodFromSVGType(attributes.spreadMethod()), |
| 58 platformSpreadMethodFromSVGType(attributes.spreadMethod())); | 58 Gradient::ColorInterpolation::Unpremultiplied); |
| 59 gradient->addColorStops(attributes.stops()); | 59 gradient->addColorStops(attributes.stops()); |
| 60 return gradient.release(); | 60 return gradient.release(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |