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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 RenderSVGResourceLinearGradient* gradient = static_cast<RenderSVGResourc
eLinearGradient*>(resource); | 534 RenderSVGResourceLinearGradient* gradient = static_cast<RenderSVGResourc
eLinearGradient*>(resource); |
535 | 535 |
536 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may | 536 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may |
537 // link to other gradients using xlink:href, we need to build the full i
nheritance chain, aka. collectGradientProperties() | 537 // link to other gradients using xlink:href, we need to build the full i
nheritance chain, aka. collectGradientProperties() |
538 LinearGradientAttributes attributes; | 538 LinearGradientAttributes attributes; |
539 toSVGLinearGradientElement(gradient->element())->collectGradientAttribut
es(attributes); | 539 toSVGLinearGradientElement(gradient->element())->collectGradientAttribut
es(attributes); |
540 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); | 540 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); |
541 | 541 |
542 ts << " [start=" << gradient->startPoint(attributes) << "] [end=" << gra
dient->endPoint(attributes) << "]\n"; | 542 ts << " [start=" << gradient->startPoint(attributes) << "] [end=" << gra
dient->endPoint(attributes) << "]\n"; |
543 } else if (resource->resourceType() == RadialGradientResourceType) { | 543 } else if (resource->resourceType() == RadialGradientResourceType) { |
544 RenderSVGResourceRadialGradient* gradient = static_cast<RenderSVGResourc
eRadialGradient*>(resource); | 544 RenderSVGResourceRadialGradient* gradient = toRenderSVGResourceRadialGra
dient(resource); |
545 | 545 |
546 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may | 546 // Dump final results that are used for rendering. No use in asking SVGG
radientElement for its gradientUnits(), as it may |
547 // link to other gradients using xlink:href, we need to build the full i
nheritance chain, aka. collectGradientProperties() | 547 // link to other gradients using xlink:href, we need to build the full i
nheritance chain, aka. collectGradientProperties() |
548 RadialGradientAttributes attributes; | 548 RadialGradientAttributes attributes; |
549 toSVGRadialGradientElement(gradient->element())->collectGradientAttribut
es(attributes); | 549 toSVGRadialGradientElement(gradient->element())->collectGradientAttribut
es(attributes); |
550 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); | 550 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.
gradientTransform(), attributes.gradientUnits()); |
551 | 551 |
552 FloatPoint focalPoint = gradient->focalPoint(attributes); | 552 FloatPoint focalPoint = gradient->focalPoint(attributes); |
553 FloatPoint centerPoint = gradient->centerPoint(attributes); | 553 FloatPoint centerPoint = gradient->centerPoint(attributes); |
554 float radius = gradient->radius(attributes); | 554 float radius = gradient->radius(attributes); |
(...skipping 104 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 |