Specifies a transfer function for a color component to be applied while rendering.
The available functions include linear, piecewise-linear, gamma and step functions.
Note that the transfer function is applied to un-premultiplied values, and all results are clamped to the [0, 1] range.
Creates a copy of self.
Passed: a <GskComponentTransfer>.
a component transfer
Returned: a <GskComponentTransfer>.
a newly allocated copy of self
Compares two component transfers for equality.
Passed: a foreign pointer, or a bytevector.
a component transfer
Passed: a foreign pointer, or a bytevector.
another component transfer
Returned: a boolean.
true if self and other are equal
Frees a component transfer.
Passed: a <GskComponentTransfer>.
a component transfer
Creates a new component transfer that applies a step function.
The new value is computed as
C’ = values[k]
where k is the smallest value such that
k / n <= C < (k + 1) / n
Passed: a f32vector, or a list or vector, each a real number.
Values
Returned: a <GskComponentTransfer>.
a new <GskComponentTransfer>
Not passed: guile-gi gives the length of values.
Number of values
Creates a new component transfer that applies a gamma transform.
The new value is computed as
C’ = amp * pow (C, exp) + ofs
Passed: a real number.
Amplitude
Passed: a real number.
Exponent
Passed: a real number.
Offset
Returned: a <GskComponentTransfer>.
a new <GskComponentTransfer>
Creates a new component transfer that doesn’t change the component value.
Returned: a <GskComponentTransfer>.
a new <GskComponentTransfer>
Creates a new component transfer that limits the values of the component
to n levels.
The new value is computed as
C’ = (floor (C * n) + 0.5) / n
Passed: a real number.
Number of levels
Returned: a <GskComponentTransfer>.
a new <GskComponentTransfer>
Creates a new component transfer that applies a linear transform.
The new value is computed as
C’ = C * m + b
Passed: a real number.
Slope
Passed: a real number.
Offset
Returned: a <GskComponentTransfer>.
a new <GskComponentTransfer>
Creates a new component transfer that applies a piecewise linear function.
The new value is computed as
C’ = values[k] + (C - k / (n - 1)) * n * (values[k + 1] - values[k])
where k is the smallest value such that
k / (n - 1) <= C < (k + 1) / (n - 1)
Passed: a f32vector, or a list or vector, each a real number.
Values
Returned: a <GskComponentTransfer>.
a new <GskComponentTransfer>
Not passed: guile-gi gives the length of values.
Number of values