- From: Steve Zilles <szilles@adobe.com>
- Date: Tue, 19 Feb 2008 15:51:48 -0800
- To: www-style@w3.org
- Message-Id: <6.2.1.2.2.20080219152638.14651d30@namailhost.corp.adobe.com>
With respect to the order of compositing multiple text shadows and backgrounds, I had an action item to explore what happens in SVG. (The point being that consistency among related specifications is a good thing where it makes sense.) Text shadows are done by "filters" in SVG. Filters provide an significantly more powerful (and complex) mechanism. There is one element in the filter mechanism, feMerge, that is used to composite a sequence of image layers, much like the compositing of backgrounds and text shadows. To wit, from the SVG 1.1 spec: ================ <http://www.w3.org/TR/SVG11/filters.html#feMerge>15.19 Filter primitive 'feMerge' This filter primitive composites input image layers on top of each other using the over operator with Input1 (corresponding to the first <http://www.w3.org/TR/SVG11/filters.html#feMergeNodeElement>'feMergeNode' child element) on the bottom and the last specified input, InputN (corresponding to the last <http://www.w3.org/TR/SVG11/filters.html#feMergeNodeElement>'feMergeNode' child element), on top. Many effects produce a number of intermediate layers in order to create the final output image. This filter allows us to collapse those into a single image. Although this could be done by using n-1 Composite-filters, it is more convenient to have this common operation available in this form, and offers the implementation some additional flexibility. ================ This usage supports back to front compositing which is consistent with the specification for text shadow in CSS 2.0 and inconsistent with that for background compositing.
Received on Tuesday, 19 February 2008 23:53:16 UTC