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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits()); | 506 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits()); |
507 ts << "\n"; | 507 ts << "\n"; |
508 } else if (resource->resourceType() == FilterResourceType) { | 508 } else if (resource->resourceType() == FilterResourceType) { |
509 RenderSVGResourceFilter* filter = toRenderSVGResourceFilter(resource); | 509 RenderSVGResourceFilter* filter = toRenderSVGResourceFilter(resource); |
510 writeNameValuePair(ts, "filterUnits", filter->filterUnits()); | 510 writeNameValuePair(ts, "filterUnits", filter->filterUnits()); |
511 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits()); | 511 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits()); |
512 ts << "\n"; | 512 ts << "\n"; |
513 // Creating a placeholder filter which is passed to the builder. | 513 // Creating a placeholder filter which is passed to the builder. |
514 FloatRect dummyRect; | 514 FloatRect dummyRect; |
515 IntRect dummyIntRect; | 515 IntRect dummyIntRect; |
516 RefPtr<SVGFilter> dummyFilter = SVGFilter::create(AffineTransform(), dum
myIntRect, dummyRect, dummyRect, true); | 516 RefPtr<SVGFilter> dummyFilter = SVGFilter::create(dummyIntRect, dummyRec
t, dummyRect, true); |
517 if (RefPtr<SVGFilterBuilder> builder = filter->buildPrimitives(dummyFilt
er.get())) { | 517 if (RefPtr<SVGFilterBuilder> builder = filter->buildPrimitives(dummyFilt
er.get())) { |
518 if (FilterEffect* lastEffect = builder->lastEffect()) | 518 if (FilterEffect* lastEffect = builder->lastEffect()) |
519 lastEffect->externalRepresentation(ts, indent + 1); | 519 lastEffect->externalRepresentation(ts, indent + 1); |
520 } | 520 } |
521 } else if (resource->resourceType() == ClipperResourceType) { | 521 } else if (resource->resourceType() == ClipperResourceType) { |
522 writeNameValuePair(ts, "clipPathUnits", toRenderSVGResourceClipper(resou
rce)->clipPathUnits()); | 522 writeNameValuePair(ts, "clipPathUnits", toRenderSVGResourceClipper(resou
rce)->clipPathUnits()); |
523 ts << "\n"; | 523 ts << "\n"; |
524 } else if (resource->resourceType() == MarkerResourceType) { | 524 } else if (resource->resourceType() == MarkerResourceType) { |
525 RenderSVGResourceMarker* marker = toRenderSVGResourceMarker(resource); | 525 RenderSVGResourceMarker* marker = toRenderSVGResourceMarker(resource); |
526 writeNameValuePair(ts, "markerUnits", marker->markerUnits()); | 526 writeNameValuePair(ts, "markerUnits", marker->markerUnits()); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 ts << " "; | 674 ts << " "; |
675 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); | 675 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); |
676 ts << " "; | 676 ts << " "; |
677 writeStandardPrefix(ts, *filter, 0); | 677 writeStandardPrefix(ts, *filter, 0); |
678 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; | 678 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; |
679 } | 679 } |
680 } | 680 } |
681 } | 681 } |
682 | 682 |
683 } // namespace blink | 683 } // namespace blink |
OLD | NEW |