elm-community / typed-svg / TypedSvg.Filters

SVG Filter Elements

Typical usage:

    import TypedSvg.Filters as Fe
    import TypedSvg.Filters.Attributes exposing (..)

    Fe.filter []
        [ Fe.blend [in InSourceGraphic, in2 InFillPaint, mode ModeMultiply] []
        ]

blend : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

The `Filters.blend` SVG filter primitive composes two objects together
ruled by a certain blending mode. This is similar to what is known from
image editing software when blending two layers. The mode is defined by the
`mode` attribute.

Attributes: in, in2, mode

Global Attributes: id, class, height, result, style, tabindex, width, x, y

Presentation Attributes

See: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feBlend

colorMatrix : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

The `colorMatrix` SVG filter element changes colors based on a
transformation matrix. Every pixel's color value (represented by an
[R,G,B,A] vector) is matrix multiplied to create a new color.

Specific Attributes: in, colorMatrixType, colorMatrixValues

Global Attributes: id, class, height, result, style, tabindex, width, x, y

Presentation Attributes

componentTransfer : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

The `componentTransfer` SVG filter primitive performs color-component-wise
remapping of data for each pixel. It allows operations like brightness
adjustment, contrast adjustment, color balance or thresholding.

The calculations are performed on non-premultiplied color values. The colors
are modified by changing each channel (R, G, B, and A) to the result of what
the children `funcR`, `funcB`, `funcG`, and `funcA` return.

Specific Attributes: in

Global Attributes: id, class, height, result, style, tabindex, width, x, y

Presentation Attributes

composite : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

This filter primitive performs the combination of two input images
pixel-wise in image space using one of the Porter-Duff compositing
operations:

    over, in, atop, out, xor, and lighter

Additionally, a component-wise arithmetic operation (with the result clamped
between [0..1]) can be applied.

The arithmetic operation is useful for combining the output from the
`diffuseLighting` and `specularLighting` filters with texture data. If the
arithmetic operation is chosen, each result pixel is computed using the
following formula:

    result = k1*i1*i2 + k2*i1 + k3*i2 + k4

where:

`i1` and `i2` indicate the corresponding pixel channel values of the input
image, which map to `in` and `in2` respectively.

`k1`, `k2`, `k3` and `k4` indicate the values of the attributes with the
same name.

Specific Attributes: in, in2, compositeOperator, k1, k2, k3, k4

Global Attributes: id, class, height, result, style, tabindex, width, x, y

Presentation Attributes

convolveMatrix : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

The `convolveMatrix` SVG filter primitive applies a matrix convolution
filter effect. A convolution combines pixels in the input image with
neighboring pixels to produce a resulting image. A wide variety of imaging
operations can be achieved through convolutions, including blurring, edge
detection, sharpening, embossing and beveling.

Specific Attributes: in, order, kernelMatrix, divisor, bias, targetX,
    targetY, edgeMode, kernelUnitLength, preserveAlpha

Global Attributes: id, class, height, result, style, tabindex, width, x, y

Presentation Attributes

diffuseLighting : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

displacementMap : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

flood : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

funcA : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

funcB : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

funcG : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

funcR : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

gaussianBlur : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

image : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

merge : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

mergeNode : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

morphology : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

offset : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

specularLighting : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

tile : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

turbulence : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

Light source elements

distantLight : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

pointLight : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg

spotLight : List (TypedSvg.Core.Attribute msg) -> List (TypedSvg.Core.Svg msg) -> TypedSvg.Core.Svg msg