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) 2008 Eric Seidel <eric@webkit.org> | 3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 bool boundingBoxMode, | 91 bool boundingBoxMode, |
92 const AffineTransform& gradientTran
sform) | 92 const AffineTransform& gradientTran
sform) |
93 { | 93 { |
94 RenderObject* textRootBlock = RenderSVGText::locateRenderSVGTextAncestor(obj
ect); | 94 RenderObject* textRootBlock = RenderSVGText::locateRenderSVGTextAncestor(obj
ect); |
95 ASSERT(textRootBlock); | 95 ASSERT(textRootBlock); |
96 | 96 |
97 AffineTransform absoluteTransform; | 97 AffineTransform absoluteTransform; |
98 SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(t
extRootBlock, absoluteTransform); | 98 SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(t
extRootBlock, absoluteTransform); |
99 | 99 |
100 targetRect = textRootBlock->repaintRectInLocalCoordinates(); | 100 targetRect = textRootBlock->repaintRectInLocalCoordinates(); |
101 SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, targetRec
t, imageBuffer); | 101 SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, targetRec
t, imageBuffer, false); |
102 | 102 |
103 AffineTransform matrix; | 103 AffineTransform matrix; |
104 if (boundingBoxMode) { | 104 if (boundingBoxMode) { |
105 FloatRect maskBoundingBox = textRootBlock->objectBoundingBox(); | 105 FloatRect maskBoundingBox = textRootBlock->objectBoundingBox(); |
106 matrix.translate(maskBoundingBox.x(), maskBoundingBox.y()); | 106 matrix.translate(maskBoundingBox.x(), maskBoundingBox.y()); |
107 matrix.scaleNonUniform(maskBoundingBox.width(), maskBoundingBox.height()
); | 107 matrix.scaleNonUniform(maskBoundingBox.width(), maskBoundingBox.height()
); |
108 } | 108 } |
109 matrix *= gradientTransform; | 109 matrix *= gradientTransform; |
110 return matrix; | 110 return matrix; |
111 } | 111 } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 return SpreadMethodRepeat; | 270 return SpreadMethodRepeat; |
271 } | 271 } |
272 | 272 |
273 ASSERT_NOT_REACHED(); | 273 ASSERT_NOT_REACHED(); |
274 return SpreadMethodPad; | 274 return SpreadMethodPad; |
275 } | 275 } |
276 | 276 |
277 } | 277 } |
278 | 278 |
279 #endif | 279 #endif |
OLD | NEW |