[CREATE] OpenRaster specification: updates to support masking

2013-12-06 Thread Andrew Chadwick
I'm in the process of (slowly and experimentally) refactoring the layers
code in MyPaint to add a bunch of fancy features like masking, nested
layers, and layer formats other than raster (but which either rasterize
(like SVG) or can be represented usefully as an icon (like basically
nothing right now)).

I've noticed that the OpenRaster specification will need to be updated
to support the Porter-Duff in operator, and I'd like to take the
opportunity to allow sub-stacks to be composited with user-specifiable
blending and compositing operators. Conveniently enough, the W3C
Compositing and Blending Level 1 specification has evolved into a very
helpful and complete form, and defines neatly an important aspect of how
groups in formats like SVG - equivalent to our nested stacks - should
be expected to render.

Therefore I'd like to update the OpenRaster draft specification[1] in
accordance with the attached proposal. See
https://gist.github.com/achadwick/7827931 in case the attachment hasn't
made it through the mailing list software.


[1] http://www.freedesktop.org/wiki/Specifications/OpenRaster/Draft

-- 
Andrew Chadwick

0. Updates to the OpenRaster Stack Specification


The `OpenRaster stack specification`__ is missing some details which need to be 
added to make masking possible. It also doesn't specify how sub-stacks should 
to composite on top of other elements in a stack, although in practice this has 
not mattered so far.

.. __: 
http://www.freedesktop.org/wiki/Specifications/OpenRaster/Draft/LayersStack/

I'm intending to add sub-layers and masking to MyPaint, and as OpenRaster is 
our primary (and only!) layered file format, we need to update the 
specification. In keeping with previous work on the OpenRaster spec, I'd like 
to use as much of the W3C work on compositing and blending as possible since we 
already point to that as the model to use for compositing layers. We currently 
point to a 2004 W3C Working Draft for `SVG Compositing`_, augmented by an 
evolving Working Draft addressing `Compositing and Blending`_.

.. _SVG Compositing: 
http://dev.w3.org/SVG/modules/compositing/master/SVGCompositing.html
.. _Compositing and Blending: http://www.w3.org/TR/2012/WD-compositing-20120816/

The `Compositing and Blending Level 1`_ specification is approaching becoming a 
Candidate Recommendation for Canvas 2D, SVG, HTML and related web technologies. 
I would like to use this updated document and the SVG group model it describes 
as the model for OpenRaster stacking.

.. _`Compositing and Blending Level 1`: http://www.w3.org/TR/compositing-1/


1. Proposed Changes in Detail
=

1.0. Separate compositing from blending, add Porter-Duff ops


The OpenRaster ``layer/`` element currently has a ``composite-op`` attribute 
which is based on the SVG 1.2 standard, plus a few extra non-separable modes 
from an early draft of `Compositing and Blending Level 1`_.  These all operate 
as `blending operations`_ which combine the RGB values from a top layer and a 
bottom layer into a resultant RGB value. This *blending* result is then 
*composited* onto the target layer using an implicit `Porter-Duff operator`_ 
(almost always _over_ according to the current OpenRaster spec), and it is 
during the compositing phase that the alpha values of the top and bottom layers 
are used.

.. _`blending operations`: http://www.w3.org/TR/compositing-1/#generalformula
.. _`Porter-Duff operator`: 
http://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcover

Note that the current OpenRaster draft only permits use of the _over_ 
operator at this point. Masking demands use of Porter-Duff _in_, and it is of 
note that in the GIMP, layers with modes other than normal composite using 
Porter-Duff _in_ after the blend result is calculated, whereas in MyPaint 
_over_ is (almost) always used. To make the two programs fully interoperable, 
both need to be explicit about their implicit behaviour.

Adopting more of the `Compositing and Blending Level 1`_ spec would allow us to 
cover these use cases. Therefore I propose:

* Introducing a ``blend`` attribute to ``layer/``, permitting any value from 
`Compositing and Blending Level 1`_'s ``blend-mode`` production:

:Values: normal | multiply | screen | overlay | darken | lighten | 
color-dodge | color-burn | hard-light | soft-light | difference | exclusion | 
hue | saturation | color | luminosity
:Ref: http://www.w3.org/TR/compositing-1/#ltblendmodegt
:Default: normal

* Introducing a ``composite`` attribute to ``layer/``, permitting any value 
from `Compositing and Blending Level 1`_'s ``composite-mode`` production:

:Values: clear | copy | destination | source-over | destination-over | 
source-in | destination-in | source-out | destination-out | source-atop | 
destination-atop | xor | lighter
:Ref: 

[CREATE] Open source patternmaking tool

2013-12-06 Thread Susan Spencer
This program was recently developed by Roman Telezhinsky
and is now going through initial testing and UI development.

http://www.opennet.ru/opennews/art.shtml?num=38602

If there is anyone on this list who can help with translation
we would really appreciate your help!

- Susan
___
CREATE mailing list
CREATE@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/create