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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 | 532 |
533 AffineTransform transform = attributes.patternTransform(); | 533 AffineTransform transform = attributes.patternTransform(); |
534 if (!transform.isIdentity()) | 534 if (!transform.isIdentity()) |
535 ts << " [patternTransform=" << transform << "]"; | 535 ts << " [patternTransform=" << transform << "]"; |
536 ts << "\n"; | 536 ts << "\n"; |
537 } else if (resource->resourceType() == LinearGradientResourceType) { | 537 } else if (resource->resourceType() == LinearGradientResourceType) { |
538 RenderSVGResourceLinearGradient* gradient = static_cast<RenderSVGResourc
eLinearGradient*>(resource); | 538 RenderSVGResourceLinearGradient* gradient = static_cast<RenderSVGResourc
eLinearGradient*>(resource); |
539 | 539 |
540 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may | 540 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may |
541 // link to other gradients using xlink:href, we need to build the full i
nheritance chain, aka. collectGradientProperties() | 541 // link to other gradients using xlink:href, we need to build the full i
nheritance chain, aka. collectGradientProperties() |
542 SVGLinearGradientElement* linearGradientElement = static_cast<SVGLinearG
radientElement*>(gradient->node()); | |
543 | |
544 LinearGradientAttributes attributes; | 542 LinearGradientAttributes attributes; |
545 linearGradientElement->collectGradientAttributes(attributes); | 543 toSVGLinearGradientElement(gradient->node())->collectGradientAttributes(
attributes); |
546 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); | 544 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); |
547 | 545 |
548 ts << " [start=" << gradient->startPoint(attributes) << "] [end=" << gra
dient->endPoint(attributes) << "]\n"; | 546 ts << " [start=" << gradient->startPoint(attributes) << "] [end=" << gra
dient->endPoint(attributes) << "]\n"; |
549 } else if (resource->resourceType() == RadialGradientResourceType) { | 547 } else if (resource->resourceType() == RadialGradientResourceType) { |
550 RenderSVGResourceRadialGradient* gradient = static_cast<RenderSVGResourc
eRadialGradient*>(resource); | 548 RenderSVGResourceRadialGradient* gradient = static_cast<RenderSVGResourc
eRadialGradient*>(resource); |
551 | 549 |
552 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may | 550 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may |
553 // link to other gradients using xlink:href, we need to build the full i
nheritance chain, aka. collectGradientProperties() | 551 // link to other gradients using xlink:href, we need to build the full i
nheritance chain, aka. collectGradientProperties() |
554 SVGRadialGradientElement* radialGradientElement = static_cast<SVGRadialG
radientElement*>(gradient->node()); | 552 SVGRadialGradientElement* radialGradientElement = static_cast<SVGRadialG
radientElement*>(gradient->node()); |
555 | 553 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 ts << " "; | 665 ts << " "; |
668 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); | 666 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); |
669 ts << " "; | 667 ts << " "; |
670 writeStandardPrefix(ts, *filter, 0); | 668 writeStandardPrefix(ts, *filter, 0); |
671 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; | 669 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; |
672 } | 670 } |
673 } | 671 } |
674 } | 672 } |
675 | 673 |
676 } // namespace WebCore | 674 } // namespace WebCore |
OLD | NEW |