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.CompositeNode

Contents

- Exported types
- Methods
  - getChild
  - getMask
  - getOperator
  - new

Description

A render node that uses Porter/Duff compositing operators to combine its child with the background.

Since: 4.22

Synopsis

- newtype CompositeNode = CompositeNode (ManagedPtr CompositeNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf CompositeNode o) => IsCompositeNode o
- toCompositeNode :: (MonadIO m, IsCompositeNode o) => o -> m CompositeNode
- compositeNodeGetChild :: (HasCallStack, MonadIO m, IsCompositeNode a) => a -> m RenderNode
- compositeNodeGetMask :: (HasCallStack, MonadIO m, IsCompositeNode a) => a -> m RenderNode
- compositeNodeGetOperator :: (HasCallStack, MonadIO m, IsCompositeNode a) => a -> m PorterDuff
- compositeNodeNew :: (HasCallStack, MonadIO m, IsRenderNode a, IsRenderNode b) => a -> b -> PorterDuff -> m CompositeNode

# Exported types

newtype CompositeNode Source #

Memory-managed wrapper type.

Constructors

CompositeNode (ManagedPtr CompositeNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf CompositeNode o) => IsCompositeNode o Source #

Type class for types which can be safely cast to `CompositeNode`, for instance with `toCompositeNode`.

#### Instances

Instances details

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

toCompositeNode :: (MonadIO m, IsCompositeNode o) => o -> m CompositeNode Source #

Cast to `CompositeNode`, 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, getChildren, getMask, getNodeType, getOpaqueRect, getOperator.

#### Setters

None.

## getChild

compositeNodeGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsCompositeNode a) |
=> a | `node`: a composite `GskRenderNode`
-> m RenderNode | Returns: the child `GskRenderNode`

Gets the child node that is getting composited by the given `node`.

Since: 4.22

## getMask

compositeNodeGetMask Source #

Arguments

:: (HasCallStack, MonadIO m, IsCompositeNode a) |
=> a | `node`: a composite `GskRenderNode`
-> m RenderNode | Returns: the mask `GskRenderNode`

Gets the mask node that describes the region where the compositing applies.

Since: 4.22

## getOperator

compositeNodeGetOperator Source #

Arguments

:: (HasCallStack, MonadIO m, IsCompositeNode a) |
=> a | `node`: a composite `GskRenderNode`
-> m PorterDuff | Returns: The compositing operator

Gets the compositing operator used by this node.

Since: 4.22

## new

compositeNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsRenderNode a, IsRenderNode b) |
=> a | `child`: The child to composite
-> b | `mask`: The mask where the compositing will apply
-> PorterDuff | `op`: The compositing operator
-> m CompositeNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that will composite the child onto the background with the given operator wherever the mask is set.

Note that various operations can modify the background outside of the child's bounds, so the mask may cause visual changes outside of the child.

Since: 4.22