1.8 <GskColorMatrixNode>

Class: <GskColorMatrixNode>

It derives from <GskRenderNode>.

A render node controlling the color matrix of its single child node.

Procedures

Method: color-matrix-node:get-child self ⇒ %return
Method: get-child self ⇒ %return

Gets the child node that is getting its colors modified by the given self.

self

Passed: a <GskColorMatrixNode>.

a color matrix <GskRenderNode>

%return

Returned: a <GskRenderNode>.

The child that is getting its colors modified

Method: color-matrix-node:get-color-matrix self ⇒ %return
Method: get-color-matrix self ⇒ %return

Retrieves the color matrix used by the self.

self

Passed: a <GskColorMatrixNode>.

a color matrix <GskRenderNode>

%return

Returned: a <GrapheneMatrix>.

a 4x4 color matrix

Method: color-matrix-node:get-color-offset self ⇒ %return
Method: get-color-offset self ⇒ %return

Retrieves the color offset used by the self.

self

Passed: a <GskColorMatrixNode>.

a color matrix <GskRenderNode>

%return

Returned: a <GrapheneVec4>.

a color vector

Procedure: color-matrix-node:new child color-matrix color-offset ⇒ %return

Creates a <GskRenderNode> that will drawn the child with color-matrix.

In particular, the node will transform colors by applying

pixel = transpose(color_matrix) * pixel + color_offset

for every pixel. The transformation operates on unpremultiplied colors, with color components ordered R, G, B, A.

child

Passed: a <GskRenderNode>.

The node to draw

color-matrix

Passed: a <GrapheneMatrix>.

The matrix to apply

color-offset

Passed: a <GrapheneVec4>.

Values to add to the color

%return

Returned: a <GskColorMatrixNode>.

A new <GskRenderNode>