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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 LinearGradientAttributes attributes; | 544 LinearGradientAttributes attributes; |
545 linearGradientElement->collectGradientAttributes(attributes); | 545 linearGradientElement->collectGradientAttributes(attributes); |
546 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); | 546 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); |
547 | 547 |
548 ts << " [start=" << gradient->startPoint(attributes) << "] [end=" << gra
dient->endPoint(attributes) << "]\n"; | 548 ts << " [start=" << gradient->startPoint(attributes) << "] [end=" << gra
dient->endPoint(attributes) << "]\n"; |
549 } else if (resource->resourceType() == RadialGradientResourceType) { | 549 } else if (resource->resourceType() == RadialGradientResourceType) { |
550 RenderSVGResourceRadialGradient* gradient = static_cast<RenderSVGResourc
eRadialGradient*>(resource); | 550 RenderSVGResourceRadialGradient* gradient = static_cast<RenderSVGResourc
eRadialGradient*>(resource); |
551 | 551 |
552 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may | 552 // 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() | 553 // 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()); | |
555 | |
556 RadialGradientAttributes attributes; | 554 RadialGradientAttributes attributes; |
557 radialGradientElement->collectGradientAttributes(attributes); | 555 toSVGRadialGradientElement(gradient->node())->collectGradientAttributes(
attributes); |
558 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); | 556 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); |
559 | 557 |
560 FloatPoint focalPoint = gradient->focalPoint(attributes); | 558 FloatPoint focalPoint = gradient->focalPoint(attributes); |
561 FloatPoint centerPoint = gradient->centerPoint(attributes); | 559 FloatPoint centerPoint = gradient->centerPoint(attributes); |
562 float radius = gradient->radius(attributes); | 560 float radius = gradient->radius(attributes); |
563 float focalRadius = gradient->focalRadius(attributes); | 561 float focalRadius = gradient->focalRadius(attributes); |
564 | 562 |
565 ts << " [center=" << centerPoint << "] [focal=" << focalPoint << "] [rad
ius=" << radius << "] [focalRadius=" << focalRadius << "]\n"; | 563 ts << " [center=" << centerPoint << "] [focal=" << focalPoint << "] [rad
ius=" << radius << "] [focalRadius=" << focalRadius << "]\n"; |
566 } else | 564 } else |
567 ts << "\n"; | 565 ts << "\n"; |
(...skipping 99 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 |