These primitives composite two or more graphics. The graphics may be from an object, a background, or the output of another primitive.
Nota | |
---|---|
Inkscape v0.46 has a problem in using one of these filters. When using either Background Image or Background Alpha as an input to the filter, the «enabled-background» tag must be added to the SVG file (this tells SVG renderers to keep a copy of the background in memory). This is not done. A work-around is to use the Livelli dialog to add a Miscela filter to a Livello. The Livello blend can then be removed, leaving the necessary tag in place. |
Nota | |
---|---|
The SVG 1.1 specification has a problem when an object is composited with a background that is not fully opaque. The background is included twice (once with the composited image and once as a background). There are three ways to deal with this problem. The first is to avoid using a Background Image or Background Alpha as a filter input. The second is to replace a transparent background with a solid background (you can use the Strumento Contagocce to replace a transparent Riempimento with an equivalent solid Riempimento [turn off «Pick alpha» in the Controlli Strumento]). The third is to use the Riempimento filter to create a solid white background and include this as the first input to a Mischia filter (if using a Mischia filter, include the flood first; if using a Miscela or Composto filter, add a Mischia filter with the first input being the output from the Riempimento filter and the second input being the output from the Miscela or Composto filter). This solution runs into trouble when it is desired that the overall image have transparency. The SVG 1.2 standard corrects this deficiency. |
The Miscela primitive blends two overlapping objects or an object with its background by doing a pixel-by-pixel combination using one of five defined blend modes. The five modes are listed below. Except for the Normal mode, the result is independent of which object is on top.
For each mode, the mathematical definition is given. In the definitions, a corresponds to an object on top of b. c is the RGB color of the object while q is the opacitą. Both c and q range from 0 to 1. Each of the RGB colors is combined independently.
The Miscela filter primitive can also be applied to a Livello through the Livelli dialog. In this case, input one is the selected object while input two is set to the Background Image.
The Composto filter primitive allows two overlapping objects or an object and background to be merged pixel-by-pixel according to a mode-dependent rule. See the introduction to this section for problems when using a background as one of the inputs.
The possible modes are:
The Mischia filter allows the combining of two or more objects or outputs of filter primitives. It works by layering one image on top of another, much as regular objects are layered on top of each other in z-order, or, for the case of two inputs, as the Composto filter primitive using the «Over» mode.
When the Mischia filter is added to a complex filter an unassigned input node is created. As each input is assigned, another empty input node is created. This empty node is not included in the SVG tree structure.
© 2005-2008 Tavmjong Bah. | Get the book. |