Alternate constructors for GskComponentTransfer. Usage:
GskComponentTransferCtors.<name>(...). The primary constructor lives
directly on GskComponentTransfer.
Methods
newDiscrete (list values)
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
@pn is Number of values.
@pvalues is Values.
@rA new GskComponentTransfer.
newGamma (double amp, double exp, double ofs)
Creates a new component transfer that applies a gamma transform. The new value is computed as C' = amp * pow (C, exp) + ofs
@pamp is Amplitude.
@pexp is Exponent.
@pofs is Offset.
@rA new GskComponentTransfer.
newLevels (double n)
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
@pn is Number of levels.
@rA new GskComponentTransfer.
newLinear (double m, double b)
Creates a new component transfer that applies a linear transform. The new value is computed as C' = C * m + b
@pm is Slope.
@pb is Offset.
@rA new GskComponentTransfer.
newTable (list values)
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)
@pn is Number of values.
@pvalues is Values.
@rA new GskComponentTransfer.
class: GskComponentTransfer
[15:7] extends: object
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.
Members
handleObj
lib
retainedCallbacks
signalHandlerNames
signalSetterHandlers
Methods
GskComponentTransfer (Handle = null)
Creates a new component transfer that doesn't change the component value.
@pHandle is an optional native handle or wrapper whose handle to adopt; when the native constructor is called.
toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.
@pSource is the raw handle, raw buffer, wrapper, or null.
@rA raw pointer carrier or null when no pointer is present.
getLib ()
Returns the opened native library for this generated wrapper.
@rThe opened native library.
handle ()
Returns the wrapped NativeHandle.
@rThe wrapped NativeHandle.
isNull ()
Returns true when the wrapped handle is null.
@rA bool.
describe ()
Returns a small string for debugging generated wrappers.