The feComposite Filter

So far we have combined the results of filters by using lt feMerge gt to layer the intermediate results one over another. We will now investigate the much more general lt feComposite gt element. This element takes two inputs, specified with the in and in2 attributes, and an operator that tells how the two are to be combined. In the following explanation, we'll presume that you've specified in A and in2 B. lt feComposite operator over in A in2 B gt Produces the result of layering a over b,...

Using Perl to Convert Custom Data to SVG

If anyone l ives a l i fe that revolves around graphics di splay, it's a mapmaker. Cartographers are finding XML markup in general and SVG in particular to be excellent vehicles for putting data into a portable format. At present, though, much of the data that is currently available is in custom or proprietary formats. One of these is the proprietary format developed by Environmental Systems Research Institute for use by their ArcInfo Geographic Information System. Data created in this system...

Example Embossing with feConvolveMatrix

filter id emboss gt lt feConvolveMatrix kernelMatrix 1 0 0 0 0 0 0 0 -1 gt lt filter gt lt -- flower graphic goes here -- gt lt g gt lt use xlink href flower style filter url emboss gt Although the default matrix size is three columns by three rows, you can specify any size you want with the order attribute. If you specify order 4, then the matrix will require sixteen numbers 4 by 4 in the kernelMatrix attribute. A matrix with three columns and two rows would be specified by order 3 2 and would...

Example Example of feFlood and feTile

lt filter id flood-filter x 0 y 0 width 100 height 100 gt feFlood flood-color 993300 flood-opacity 0.8 result tint gt lt feComposite in tint in2 SourceGraphic operator in gt lt filter gt lt filter id tile-filter x 0 y 0 width 100 height 100 gt lt feImage xlink href cloth.jpg width 32 height 32 result cloth gt lt feTile in cloth result cloth gt lt feComposite in cloth in2 SourceGraphic operator in gt lt filter gt lt -- flower graphic goes here -- gt lt g gt lt use xlink href flower transform...