[css-compositing] some proposals

All,

I have some proposals for the SVG compositing spec:
http://www.w3.org/TR/SVGCompositing/.
We can have a conversation on each item and if there is a general
consensus, I will start to update the compositing spec.

a. split up the spec in 2 sections: Porter-Duff & Blending.
Porter-Duff are compositing primitives that describes how 2 images
(src+dst) can be merged.
Blending describes how the top image will 'blend' with its underlying
colors. The result of this is a new blended image. So far, we assume that
after blending, this image is composited with Porter-Duff src-over.

I am tempted to split the spec, but keep the comp-op keyword the same for
both PD and blending.
This does imply that you won't be able to do xor or src-in with blended
content. Does anyone believe that this is a use case?

b. simplify Porter-Duff
- remove the clip-to-self property. The default behavior becomes
'clip-to-self: object'. Does anyone believe that 'clip-to-self: canvas' is
useful? It feels strange to have that option in SVG.
- 'enable-background' does not apply. Children with blending will composite
up to the group with PD blending. (In effect, PD will always imply
'enable-background: new')
- 'knock-out' on the nearest ancestor with blending does not apply. If it
has 'knock-out: preserve', the group with the PD compositing operator will
still knock out.
- Simon Fraser expressed concern that this compositing operator required
access to the entire background image. Maybe we should specify that all PD
blending should be done inside a group that has 'enable-background: new'.

c. complete blend modes
- add the following missing blend modes: hue, saturation, color & luminosity
- specify that the result of blending is always composited using src-over
- potentially: change the default of enable-background to 'new' if you
specify a blend mode so a new stacking context is established. Most people
want a new stacking context and it also makes it easier and less memory
intensive to process for a SVG processor.

d. Add a new blend mode: 'normal'
- this is the default blend mode on all groups and leafs.
- similar to PD's src-over except it doesn't create a new stacking context
- 'enable-background' and 'knock-out' apply

e. update knockout
- change the value back to a boolean value from 'replace'/'preserve'. The
new value is confusing.
- provide a better description + correct the compositing formula

f. update enable-background
- remove the ability to set up x, y, width & height. I believe there's
already consensus on this.
- clarify the description and refer to the filters spec which already
defines this parameter
- maybe replace the keyword with 'isolate' which is Adobe's equivalent.
'isolate: true' = 'enable-background: new'. I think this is a little easier
to grasp and it is also familiar to designers.

Let me know of any concerns.

Rik

Received on Tuesday, 8 November 2011 03:39:18 UTC