feComponentTransfer: Perform Colour Component-wise Remapping.

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

View source: R/filters.R

Description

This filter primitive performs component-wise remapping of data by taking a colour transfer function, and applying that to the set of RGBA colour components.

It allows operations like brightness adjustment, contrast adjustment, colour balance or thresholding.

The calculations are performed on non-premultiplied colour values. If the input graphics consists of premultiplied colour values, those values are automatically converted into non-premultiplied colour values for this operation. (Note that the undoing and redoing of the premultiplication can be avoided if alpha transfer function is the identity transform and all alpha values on the source graphic are set to 1.)

Usage

1
2
3
4
5
6
7
feComponentTransfer(input = NA, transfers = NULL, ...)
addComponentFunction(ct, channel = c("R", "G", "B", "A"), func)
transferFunction(type = c("identity", "table", "discrete",
                          "linear", "gamma"),
                 tableValues = numeric(),
                 slope = 1, intercept = 0,
                 amplitude = 1, exponent = 1, offset = 0)

Arguments

input

Identifies an input for this filter primtive. See filterInputs.

transfers

A named list of transfer.function objects (produced by transferFunction). The name for each element of the list should be one of R, G, B or A.

...

Further arguments to be passed onto fe.

ct

An fe.component.transfer object, produced by feComponentTransfer.

channel

The colour channel that func will be applied to.

func

A transfer.function object, produced by transferFunction.

type

Indicates the type of component transfer function. The type of function determines the applicability of the other arguments.

tableValues

When type is "table", this is a list of values which define the lookup table.

slope

When type is "linear", the slope of the linear function.

intercept

When type is "linear", the intercept of the linear function.

amplitude

When type is "gamma", the amplitude of the gamma function.

exponent

When type is "gamma", the exponent of the gamma function.

offset

When type is "gamma", the offset of the gamma function.

Details

For more information about this primitive, consult the references to the SVG specification.

Value

For feComponentTransfer, an fe.component.transfer object.

For addComponentFunction, none.

For transferFunction, a transfer.function object.

Author(s)

Simon Potter

References

http://www.w3.org/TR/SVG/filters.html#feComponentTransferElement, http://www.w3.org/TR/SVG/filters.html#feFuncRElement

See Also

filterEffect, fe.


gridSVG documentation built on Nov. 17, 2017, 7 a.m.