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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 if (resourceMode & ApplyToTextMode) { | 164 if (resourceMode & ApplyToTextMode) { |
165 if (resourceMode & ApplyToFillMode) | 165 if (resourceMode & ApplyToFillMode) |
166 context->setTextDrawingMode(TextModeFill); | 166 context->setTextDrawingMode(TextModeFill); |
167 else if (resourceMode & ApplyToStrokeMode) | 167 else if (resourceMode & ApplyToStrokeMode) |
168 context->setTextDrawingMode(TextModeStroke); | 168 context->setTextDrawingMode(TextModeStroke); |
169 } | 169 } |
170 | 170 |
171 return true; | 171 return true; |
172 } | 172 } |
173 | 173 |
174 void RenderSVGResourcePattern::postApplyResource(RenderObject*, GraphicsContext*
& context, unsigned short resourceMode, const Path* path, const RenderSVGShape*
shape) | 174 void RenderSVGResourcePattern::postApplyResource(RenderObject*, GraphicsContext*
& context) |
175 { | 175 { |
176 ASSERT(context); | 176 ASSERT(context); |
177 SVGRenderSupport::fillOrStrokePrimitive(context, resourceMode, path, shape); | |
178 | |
179 context->restore(); | 177 context->restore(); |
180 } | 178 } |
181 | 179 |
182 static inline FloatRect calculatePatternBoundaries(const PatternAttributes& attr
ibutes, | 180 static inline FloatRect calculatePatternBoundaries(const PatternAttributes& attr
ibutes, |
183 const FloatRect& objectBoundi
ngBox, | 181 const FloatRect& objectBoundi
ngBox, |
184 const SVGPatternElement* patt
ernElement) | 182 const SVGPatternElement* patt
ernElement) |
185 { | 183 { |
186 ASSERT(patternElement); | 184 ASSERT(patternElement); |
187 return SVGLengthContext::resolveRectangle(patternElement, attributes.pattern
Units(), objectBoundingBox, attributes.x(), attributes.y(), attributes.width(),
attributes.height()); | 185 return SVGLengthContext::resolveRectangle(patternElement, attributes.pattern
Units(), objectBoundingBox, attributes.x(), attributes.y(), attributes.width(),
attributes.height()); |
188 } | 186 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 continue; | 248 continue; |
251 if (element->renderer()->needsLayout()) | 249 if (element->renderer()->needsLayout()) |
252 return nullptr; | 250 return nullptr; |
253 SVGRenderingContext::renderSubtree(tileImage->context(), element->render
er(), contentTransformation); | 251 SVGRenderingContext::renderSubtree(tileImage->context(), element->render
er(), contentTransformation); |
254 } | 252 } |
255 | 253 |
256 return tileImage.release(); | 254 return tileImage.release(); |
257 } | 255 } |
258 | 256 |
259 } | 257 } |
OLD | NEW |