About all my projects
Gnome::Gsk4::ColorMatrixNode

Gnome::Gsk4::ColorMatrixNode

Description

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

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object :$native-object! )

new-colormatrixnode

Creates a Gnome::Gsk4::RenderNode that will drawn the $child with $color-matrix.

In particular, the node will transform the operation

pixel = color_matrix * pixel + color_offset

for every pixel.

method new-colormatrixnode ( N-Object() $child, N-Object $color-matrix, N-Object $color-offset --> Gnome::Gsk4::ColorMatrixNode \)
  • $child; The node to draw.

  • $color-matrix; The matrix to apply

  • $color-offset; Values to add to the color

Methods

get-child

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

method get-child (--> N-Object )

Return value; The child that is getting its colors modified.

get-color-matrix

Retrieves the color matrix used by the $node.

method get-color-matrix (--> N-Object )

Return value; a 4x4 color matrix.

get-color-offset

Retrieves the color offset used by the $node.

method get-color-offset (--> N-Object )

Return value; a color vector.