OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2007, 2009 Apple Inc. All rights reserved. |
3 * (C) 2005 Rob Buis <buis@kde.org> | 3 * (C) 2005 Rob Buis <buis@kde.org> |
4 * (C) 2006 Alexander Kellett <lypanov@kde.org> | 4 * (C) 2006 Alexander Kellett <lypanov@kde.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 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 if (object.isSVGShape()) { | 267 if (object.isSVGShape()) { |
268 const RenderSVGShape& shape = static_cast<const RenderSVGShape&>(object)
; | 268 const RenderSVGShape& shape = static_cast<const RenderSVGShape&>(object)
; |
269 ASSERT(shape.element()); | 269 ASSERT(shape.element()); |
270 | 270 |
271 Color fallbackColor; | 271 Color fallbackColor; |
272 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::strok
ePaintingResource(const_cast<RenderSVGShape*>(&shape), shape.style(), fallbackCo
lor)) { | 272 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::strok
ePaintingResource(const_cast<RenderSVGShape*>(&shape), shape.style(), fallbackCo
lor)) { |
273 TextStreamSeparator s(" "); | 273 TextStreamSeparator s(" "); |
274 ts << " [stroke={" << s; | 274 ts << " [stroke={" << s; |
275 writeSVGPaintingResource(ts, strokePaintingResource); | 275 writeSVGPaintingResource(ts, strokePaintingResource); |
276 | 276 |
277 SVGLengthContext lengthContext(toSVGElement(shape.element())); | 277 SVGLengthContext lengthContext(shape.element()); |
278 double dashOffset = svgStyle->strokeDashOffset().value(lengthContext
); | 278 double dashOffset = svgStyle->strokeDashOffset().value(lengthContext
); |
279 double strokeWidth = svgStyle->strokeWidth().value(lengthContext); | 279 double strokeWidth = svgStyle->strokeWidth().value(lengthContext); |
280 const Vector<SVGLength>& dashes = svgStyle->strokeDashArray(); | 280 const Vector<SVGLength>& dashes = svgStyle->strokeDashArray(); |
281 | 281 |
282 DashArray dashArray; | 282 DashArray dashArray; |
283 const Vector<SVGLength>::const_iterator end = dashes.end(); | 283 const Vector<SVGLength>::const_iterator end = dashes.end(); |
284 for (Vector<SVGLength>::const_iterator it = dashes.begin(); it != en
d; ++it) | 284 for (Vector<SVGLength>::const_iterator it = dashes.begin(); it != en
d; ++it) |
285 dashArray.append((*it).value(lengthContext)); | 285 dashArray.append((*it).value(lengthContext)); |
286 | 286 |
287 writeIfNotDefault(ts, "opacity", svgStyle->strokeOpacity(), 1.0f); | 287 writeIfNotDefault(ts, "opacity", svgStyle->strokeOpacity(), 1.0f); |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 ts << " "; | 659 ts << " "; |
660 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); | 660 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); |
661 ts << " "; | 661 ts << " "; |
662 writeStandardPrefix(ts, *filter, 0); | 662 writeStandardPrefix(ts, *filter, 0); |
663 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; | 663 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; |
664 } | 664 } |
665 } | 665 } |
666 } | 666 } |
667 | 667 |
668 } // namespace WebCore | 668 } // namespace WebCore |
OLD | NEW |