| 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 context->setFillRule(svgStyle->fillRule()); | 164 context->setFillRule(svgStyle->fillRule()); |
| 165 } else if (resourceMode & ApplyToStrokeMode) { | 165 } else if (resourceMode & ApplyToStrokeMode) { |
| 166 if (svgStyle->vectorEffect() == VE_NON_SCALING_STROKE) | 166 if (svgStyle->vectorEffect() == VE_NON_SCALING_STROKE) |
| 167 patternData->pattern->setPatternSpaceTransform(transformOnNonScaling
Stroke(object, patternData->transform)); | 167 patternData->pattern->setPatternSpaceTransform(transformOnNonScaling
Stroke(object, patternData->transform)); |
| 168 context->setAlpha(svgStyle->strokeOpacity()); | 168 context->setAlpha(svgStyle->strokeOpacity()); |
| 169 context->setStrokePattern(patternData->pattern); | 169 context->setStrokePattern(patternData->pattern); |
| 170 SVGRenderSupport::applyStrokeStyleToContext(context, style, object); | 170 SVGRenderSupport::applyStrokeStyleToContext(context, style, object); |
| 171 } | 171 } |
| 172 | 172 |
| 173 if (resourceMode & ApplyToTextMode) { | 173 if (resourceMode & ApplyToTextMode) { |
| 174 if (resourceMode & ApplyToFillMode) { | 174 if (resourceMode & ApplyToFillMode) |
| 175 context->setTextDrawingMode(TextModeFill); | 175 context->setTextDrawingMode(TextModeFill); |
| 176 | 176 else if (resourceMode & ApplyToStrokeMode) |
| 177 #if USE(CG) | |
| 178 context->applyFillPattern(); | |
| 179 #endif | |
| 180 } else if (resourceMode & ApplyToStrokeMode) { | |
| 181 context->setTextDrawingMode(TextModeStroke); | 177 context->setTextDrawingMode(TextModeStroke); |
| 182 | |
| 183 #if USE(CG) | |
| 184 context->applyStrokePattern(); | |
| 185 #endif | |
| 186 } | |
| 187 } | 178 } |
| 188 | 179 |
| 189 return true; | 180 return true; |
| 190 } | 181 } |
| 191 | 182 |
| 192 void RenderSVGResourcePattern::postApplyResource(RenderObject*, GraphicsContext*
& context, unsigned short resourceMode, const Path* path, const RenderSVGShape*
shape) | 183 void RenderSVGResourcePattern::postApplyResource(RenderObject*, GraphicsContext*
& context, unsigned short resourceMode, const Path* path, const RenderSVGShape*
shape) |
| 193 { | 184 { |
| 194 ASSERT(context); | 185 ASSERT(context); |
| 195 ASSERT(resourceMode != ApplyToDefaultMode); | 186 ASSERT(resourceMode != ApplyToDefaultMode); |
| 196 | 187 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 return nullptr; | 270 return nullptr; |
| 280 SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), node->r
enderer(), contentTransformation); | 271 SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), node->r
enderer(), contentTransformation); |
| 281 } | 272 } |
| 282 | 273 |
| 283 return tileImage.release(); | 274 return tileImage.release(); |
| 284 } | 275 } |
| 285 | 276 |
| 286 } | 277 } |
| 287 | 278 |
| 288 #endif | 279 #endif |
| OLD | NEW |