feFuncR
feFuncR
This article is Not Ready.
Needs Summary: This article does not have a summary. Summaries give a brief overview of the topic and are automatically included on some listing pages that link to this article.
Overview Table
DOM Interface | SVGElement |
---|
Needs Examples: This section should include examples.
Notes
Remarks
This topic describes the feFuncR, feFuncG, feFuncB, and feFuncA elements. These four elements are typically children of feComponentTransferelement and specify the transfer functions for the four channels, as follows:
- feFuncR — transfer function for the red component of the input graphic
- feFuncG — transfer function for the green component of the input graphic
- feFuncB — transfer function for the blue component of the input graphic
- feFuncA — transfer function for the alpha component of the input graphic
The following rules apply to the processing of the feComponentTransferelement element:
- If more than one transfer function element of the same kind is specified, the last occurrence is used.
- If any of the transfer function elements are unspecified, the feComponentTransferelement must be processed as if those transfer function elements were specified with their type attributes set to identity (see below).
In addition to core attributes (id, xml:base, xml:lang, and xml:space), the following seven attributes are applicable to the feFuncR, feFuncG, feFuncB, and feFuncA elements:
- type
The type attribute can be one of five values: identity, table, discrete, linear, or gamma (see below). These five values indicate the type of component transfer function. The value of type determines the applicability of the other attributes (as discussed below).
In the following, C is the initial component (such as feFuncR), C' is the re-mapped component; both in the closed interval [0, 1]:
- For identity:
C' = C
- For table, the function is defined by linear interpolation between values given in the attribute tableValues (see below). The table has n+1 values (that is, v_{0} to v_{n}) specifying the start and end values for n evenly sized interpolation regions. Interpolations use the following formula:
For a value C < 1, find k such that k/n <= C < (k+1)/n
The result C' is given by C' = v_{k} + (C - k/n)*n * (v_{k+1} - v_{k})
If C = 1 then C' = V_{n}
- For discrete, the function is defined by the step function given in the attribute tableValues (see below), which provides a list of n values (that is, v_{0} to v_{n-1}) in order to identify a step function consisting of n steps. The step function is defined by the following formula:
For a value C < 1 find k such that k/n <= C < (k+1)/n
The result C' is given by C' = v_{k}
If C = 1 then C' = v_{n-1}
- For linear, the function is defined by the following linear equation:
C' = slope * C + intercept (see below for slope and intercept)
- For gamma, the function is defined by the following exponential function:
C' = amplitude * pow(C, exponent) + offset (see below for amplitude, exponent, and offset)
- tableValues
When type="table", tableValue is a list of numbers v_{0}, v_{1}, ..., v_{n} separated by white space and/or a comma, which define the lookup table. An empty list results in an identity transfer function. If the attribute is not specified, then the effect is as if an empty list were provided.
- slope
When type="linear", slope indicates the slope of the linear function. If the attribute is not specified, then the effect is as if a value of 1 were specified.
- intercept
When type="linear", intercept indicates the intercept of the linear function. If the attribute is not specified, then the effect is as if a value of 0 were specified.
- amplitude
When type="gamma", amplitude indicates the amplitude of the gamma function. If the attribute is not specified, then the effect is as if a value of 1 were specified.
- exponent
When type="gamma", exponent indicates the exponent of the gamma function. If the attribute is not specified, then the effect is as if a value of 1 were specified.
- offset
When type="gamma", offset indicates the offset of the gamma function. If the attribute is not specified, then the effect is as if a value of 0 were specified
Syntax
Standards information
- Scalable Vector Graphics: Filter Effects, Section 15.25.7
Members
Properties
The SVGFEFuncRElement object has these properties.
- amplitude: Indicates the amplitude of the gamma function.
- exponent: Indicates the exponent of the gamma function.
- intercept: Indicates the intercept of the linear function.
- slope: Indicates the slope of the linear function.
- tableValues: Define the lookup table.
- type: The type of component transfer function. The function type determines the applicability of the other attributes.
Compatibility
Desktop
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | ? | ? | ? | ? | ? |
Mobile
Feature | Android | BlackBerry | Chrome for mobile | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Opera Mini | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | ? | ? | ? | ? | ? | ? | ? | ? |
See also
Related articles
Filters
- feFuncR
Related pages (MSDN)
Attribution
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]
This tool helps to make and review comments inline.
How to Use
insert instructions, with images, here