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

Contents

- Exported types
- Methods
  - getMask
  - getMaskMode
  - getSource
  - new

Description

A render node masking one child node with another.

Since: 4.10

Synopsis

- newtype MaskNode = MaskNode (ManagedPtr MaskNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf MaskNode o) => IsMaskNode o
- toMaskNode :: (MonadIO m, IsMaskNode o) => o -> m MaskNode
- maskNodeGetMask :: (HasCallStack, MonadIO m, IsMaskNode a) => a -> m RenderNode
- maskNodeGetMaskMode :: (HasCallStack, MonadIO m, IsMaskNode a) => a -> m MaskMode
- maskNodeGetSource :: (HasCallStack, MonadIO m, IsMaskNode a) => a -> m RenderNode
- maskNodeNew :: (HasCallStack, MonadIO m, IsRenderNode a, IsRenderNode b) => a -> b -> MaskMode -> m MaskNode

# Exported types

newtype MaskNode Source #

Memory-managed wrapper type.

Constructors

MaskNode (ManagedPtr MaskNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf MaskNode o) => IsMaskNode o Source #

Type class for types which can be safely cast to `MaskNode`, for instance with `toMaskNode`.

#### Instances

Instances details

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

toMaskNode :: (MonadIO m, IsMaskNode o) => o -> m MaskNode Source #

Cast to `MaskNode`, 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, getMask, getMaskMode, getNodeType, getOpaqueRect, getSource.

#### Setters

None.

## getMask

maskNodeGetMask Source #

Arguments

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

Retrieves the mask `GskRenderNode` child of the `node`.

Since: 4.10

## getMaskMode

maskNodeGetMaskMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsMaskNode a) |
=> a | `node`: a blending `GskRenderNode`
-> m MaskMode | Returns: the mask mode

Retrieves the mask mode used by `node`.

Since: 4.10

## getSource

maskNodeGetSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsMaskNode a) |
=> a | `node`: a mask `GskRenderNode`
-> m RenderNode | Returns: the source child node

Retrieves the source `GskRenderNode` child of the `node`.

Since: 4.10

## new

maskNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsRenderNode a, IsRenderNode b) |
=> a | `source`: The source node to be drawn
-> b | `mask`: The node to be used as mask
-> MaskMode | `maskMode`: The mask mode to use
-> m MaskNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that will mask a given node by another.

The `maskMode` determines how the 'mask values' are derived from the colors of the `mask`. Applying the mask consists of multiplying the 'mask value' with the alpha of the source.

Since: 4.10