W3C home > Mailing lists > Public > www-svg@w3.org > April 2011

Comments on SVG Compositing

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 6 Apr 2011 12:30:21 -0700
Message-ID: <BANLkTikub1NiT-5kq6LAKZ4AhELC9xje7w@mail.gmail.com>
To: www-svg <www-svg@w3.org>
I *really* don't like the current names of the clip-to-self property
or values.  One or both has to be changed; right now the property name
is nonsensical with the values, in my opinion.  As a not-very-good
suggestion, maybe "clip-to: src | canvas"?

I don't quite understand the usage of the 'knock-out' property.  I
understand what it does, but it seems to apply to rendered elements,
while the property is defined to apply to grouping elements.  In the
examples given, is 'knock-out' specified on either of the components
(the squiggly line or the blue disc), or is it on a container that
contains both of the components?

It appears that all of the first three properties are simply shortcuts
for more complex series of compositing operations.  Is this correct?
For example, in the "knockout:replace" example, it appears that one
could achieve the same result with "d over (d dst_out e)".  Similarly,
the "clip-to-self:canvas" example seems equivalent to "((e xor f) in
g) over ((e xor f) dst_out g)".  It might be useful to define these
properties explicitly in terms of virtually transforming the comp-op
sequence.  'enable-background' is the same, down to the insertion of a
dst_out operation.

I don't have strong graphics experience, so there may be something I'm
missing here, but 'enable-background' and 'knock-out' appear to be
*exactly* identical in operation, just applying to different things:
'knock-out' transforms "A op B" to "A op (A dst_out B)", while
enable-background transforms "[group image] over [background]" to
"[group image] over ([group image] dst_out [background]".  Can these
two properties be unified in some way?

~TJ
Received on Wednesday, 6 April 2011 19:31:09 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:47 GMT