filterEffect: Creating Filter Effects

Description Usage Arguments Details Value Author(s) References See Also

View source: R/filters.R

Description

Create objects which describe filter effects. These objects can be used to add filter effect primitives. They can be used to apply a filter effect to grobs and also to define a filter effect so that it may be used multiple times.

Usage

1
2
3
4
5
6
7
filterEffect(feList = NULL, filterUnits = c("coords", "bbox"),
             x = unit(0.5, "npc"), y = unit(0.5, "npc"),
             width = unit(1, "npc"), height = unit(1, "npc"),
             just = "centre", hjust = NULL, vjust = NULL,
             default.units = "npc",
             primitiveUnits = c("coords", "bbox"))
addFilterEffect(filter, filterEffect, after = NA)

Arguments

feList

A list of filter effect primitives. For example a list containing a gaussian blur primitive created by feGaussianBlur.

filterUnits

If "bbox", the filter effect itself is positioned relative to the bounding box of the referring grob. All units attempt to be converted to equivalent "npc" coordinates as a reulst.

If "coords", uses grid coordinates to determine positioning.

x

A numeric vector or unit object specifying x-location.

y

A numeric vector or unit object specifying y-location.

width

A numeric vector or unit object specifying width.

height

A numeric vector or unit object specifying height.

just

The justification of the pattern relative to its (x, y) location. If there are two values, the first value specifies horizontal justification and the second value specifies vertical justification. Possible string values are: "left", "right", "centre", "center", "bottom", and "top". For numeric values, 0 means left alignment and 1 means right alignment.

hjust

A numeric vector specifying horizontal justification. If specified, overrides the just setting.

vjust

A numeric vector specifying vertical justification. If specified, overrides the just setting.

default.units

A string indicating the default units to use if x, y, width, or height are only given as numeric vectors.

primitiveUnits

If "bbox", all filter effect primitives will be positioned relative to the bounding box of the filter effect region (determined by x, y, width, height and filterUnits). All units attempt to be converted to equivalent "npc" coordinates.

If "coords", uses grid coordinates to determine positioning.

filter

A filter effect container object, as created by filterEffect.

filterEffect

A filter effect primitive object.

after

Numeric. Determines where amongst the children of filter that filterEffect should be added. NA indicates that filterEffect should be appended to the end of the list of children.

Details

This is primarily a container object to hold filter effect primitives.

Value

A filter object.

Author(s)

Simon Potter

References

http://www.w3.org/TR/SVG/filters.html#FilterElement

See Also

Any of the filter effect primitives (named fe*), e.g. feGaussianBlur.


gridSVG documentation built on April 28, 2020, 9:05 a.m.