Donner
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::svg::components::FEFuncComponent Struct Reference

Parameters for a feFuncR/G/B/A child element within feComponentTransfer. More...

#include "donner/svg/components/filter/FilterPrimitiveComponent.h"

Collaboration diagram for donner::svg::components::FEFuncComponent:
[legend]

Public Types

enum class  Channel : std::uint8_t {
  R ,
  G ,
  B ,
  A
}
 Which channel this function applies to.
enum class  FuncType : std::uint8_t {
  Identity ,
  Table ,
  Discrete ,
  Linear ,
  Gamma
}
 Transfer function type. More...

Public Member Functions

 FEFuncComponent (Channel ch)

Public Attributes

Channel channel
 Which channel this applies to.
FuncType type = FuncType::Identity
 Transfer function type.
std::vector< double > tableValues
 Values for table/discrete types.
double slope = 1.0
 Slope for linear type.
double intercept = 0.0
 Intercept for linear type.
double amplitude = 1.0
 Amplitude for gamma type.
double exponent = 1.0
 Exponent for gamma type.
double offset = 0.0
 Offset for gamma type.

Detailed Description

Parameters for a feFuncR/G/B/A child element within feComponentTransfer.

Each func element defines a transfer function for one RGBA channel.

Member Enumeration Documentation

◆ FuncType

enum class donner::svg::components::FEFuncComponent::FuncType : std::uint8_t
strong

Transfer function type.

Enumerator
Identity 

No change.

Table 

Piecewise linear lookup.

Discrete 

Step function lookup.

Linear 

slope * C + intercept.

Gamma 

amplitude * pow(C, exponent) + offset.


The documentation for this struct was generated from the following file: