gi-gsk-4.0.9: Gsk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gsk.Objects.ColorMatrixNode

Contents

- Exported types
- Methods
  - getChild
  - getColorMatrix
  - getColorOffset
  - new

Description

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

Synopsis

- newtype ColorMatrixNode = ColorMatrixNode (ManagedPtr ColorMatrixNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf ColorMatrixNode o) => IsColorMatrixNode o
- toColorMatrixNode :: (MonadIO m, IsColorMatrixNode o) => o -> m ColorMatrixNode
- colorMatrixNodeGetChild :: (HasCallStack, MonadIO m, IsColorMatrixNode a) => a -> m RenderNode
- colorMatrixNodeGetColorMatrix :: (HasCallStack, MonadIO m, IsColorMatrixNode a) => a -> m Matrix
- colorMatrixNodeGetColorOffset :: (HasCallStack, MonadIO m, IsColorMatrixNode a) => a -> m Vec4
- colorMatrixNodeNew :: (HasCallStack, MonadIO m, IsRenderNode a) => a -> Matrix -> Vec4 -> m ColorMatrixNode

# Exported types

newtype ColorMatrixNode Source #

Memory-managed wrapper type.

Constructors

ColorMatrixNode (ManagedPtr ColorMatrixNode) |

#### Instances

Instances details

Eq ColorMatrixNode Source # |
Instance details Defined in GI.Gsk.Objects.ColorMatrixNode Methods (==) :: ColorMatrixNode -> ColorMatrixNode -> Bool Source # (/=) :: ColorMatrixNode -> ColorMatrixNode -> Bool Source #
BoxedPtr ColorMatrixNode Source # |
Instance details Defined in GI.Gsk.Objects.ColorMatrixNode Methods boxedPtrCopy :: ColorMatrixNode -> IO ColorMatrixNode Source # boxedPtrFree :: ColorMatrixNode -> IO () Source #
ManagedPtrNewtype ColorMatrixNode Source # |
Instance details Defined in GI.Gsk.Objects.ColorMatrixNode Methods toManagedPtr :: ColorMatrixNode -> ManagedPtr ColorMatrixNode Source #
TypedObject ColorMatrixNode Source # |
Instance details Defined in GI.Gsk.Objects.ColorMatrixNode Methods glibType :: IO GType Source #
HasParentTypes ColorMatrixNode Source # |
Instance details Defined in GI.Gsk.Objects.ColorMatrixNode
type ParentTypes ColorMatrixNode Source # |
Instance details Defined in GI.Gsk.Objects.ColorMatrixNode type ParentTypes ColorMatrixNode = '[RenderNode]

class (BoxedPtr o, TypedObject o, IsDescendantOf ColorMatrixNode o) => IsColorMatrixNode o Source #

Type class for types which can be safely cast to `ColorMatrixNode`, for instance with `toColorMatrixNode`.

#### Instances

Instances details

(BoxedPtr o, TypedObject o, IsDescendantOf ColorMatrixNode o) => IsColorMatrixNode o Source # |
Instance details Defined in GI.Gsk.Objects.ColorMatrixNode

toColorMatrixNode :: (MonadIO m, IsColorMatrixNode o) => o -> m ColorMatrixNode Source #

Cast to `ColorMatrixNode`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

draw, ref, serialize, unref, writeToFile.

#### Getters

getBounds, getChild, getColorMatrix, getColorOffset, getNodeType, getOpaqueRect.

#### Setters

None.

## getChild

colorMatrixNodeGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorMatrixNode a) |
=> a | `node`: a color matrix `GskRenderNode`
-> m RenderNode | Returns: The child that is getting its colors modified

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

## getColorMatrix

colorMatrixNodeGetColorMatrix Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorMatrixNode a) |
=> a | `node`: a color matrix `GskRenderNode`
-> m Matrix | Returns: a 4x4 color matrix

Retrieves the color matrix used by the `node`.

## getColorOffset

colorMatrixNodeGetColorOffset Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorMatrixNode a) |
=> a | `node`: a color matrix `GskRenderNode`
-> m Vec4 | Returns: a color vector

Retrieves the color offset used by the `node`.

## new

colorMatrixNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsRenderNode a) |
=> a | `child`: The node to draw
-> Matrix | `colorMatrix`: The matrix to apply
-> Vec4 | `colorOffset`: Values to add to the color
-> m ColorMatrixNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that will drawn the `child` with `colorMatrix`.

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.