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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 clampedAbsoluteTileBoundaries.height() / tileBoundaries.height()); | 197 clampedAbsoluteTileBoundaries.height() / tileBoundaries.height()); |
198 | 198 |
199 // Apply tile image transformations. | 199 // Apply tile image transformations. |
200 if (!tileImageTransform.isIdentity()) | 200 if (!tileImageTransform.isIdentity()) |
201 tileImageContext->concatCTM(tileImageTransform); | 201 tileImageContext->concatCTM(tileImageTransform); |
202 | 202 |
203 AffineTransform contentTransformation; | 203 AffineTransform contentTransformation; |
204 if (attributes.patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBO
UNDINGBOX) | 204 if (attributes.patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBO
UNDINGBOX) |
205 contentTransformation = tileImageTransform; | 205 contentTransformation = tileImageTransform; |
206 | 206 |
| 207 SubtreeContentTransformScope contentTransformScope(contentTransformation); |
| 208 |
207 // Draw the content into the ImageBuffer. | 209 // Draw the content into the ImageBuffer. |
208 for (SVGElement* element = Traversal<SVGElement>::firstChild(*attributes.pat
ternContentElement()); element; element = Traversal<SVGElement>::nextSibling(*el
ement)) { | 210 for (SVGElement* element = Traversal<SVGElement>::firstChild(*attributes.pat
ternContentElement()); element; element = Traversal<SVGElement>::nextSibling(*el
ement)) { |
209 if (!element->renderer()) | 211 if (!element->renderer()) |
210 continue; | 212 continue; |
211 if (element->renderer()->needsLayout()) | 213 if (element->renderer()->needsLayout()) |
212 return nullptr; | 214 return nullptr; |
213 SVGRenderingContext::renderSubtree(tileImage->context(), element->render
er(), contentTransformation); | 215 SVGRenderingContext::renderSubtree(tileImage->context(), element->render
er()); |
214 } | 216 } |
215 | 217 |
216 return tileImage.release(); | 218 return tileImage.release(); |
217 } | 219 } |
218 | 220 |
219 } | 221 } |
OLD | NEW |