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

Contents

- Exported types
- Methods
  - getColorStops
  - getEnd
  - getNColorStops
  - getStart
  - new

Description

A render node for a linear gradient.

Synopsis

- newtype LinearGradientNode = LinearGradientNode (ManagedPtr LinearGradientNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf LinearGradientNode o) => IsLinearGradientNode o
- toLinearGradientNode :: (MonadIO m, IsLinearGradientNode o) => o -> m LinearGradientNode
- linearGradientNodeGetColorStops :: (HasCallStack, MonadIO m, IsLinearGradientNode a) => a -> m [ColorStop]
- linearGradientNodeGetEnd :: (HasCallStack, MonadIO m, IsLinearGradientNode a) => a -> m Point
- linearGradientNodeGetNColorStops :: (HasCallStack, MonadIO m, IsLinearGradientNode a) => a -> m CSize
- linearGradientNodeGetStart :: (HasCallStack, MonadIO m, IsLinearGradientNode a) => a -> m Point
- linearGradientNodeNew :: (HasCallStack, MonadIO m) => Rect -> Point -> Point -> [ColorStop] -> m LinearGradientNode

# Exported types

newtype LinearGradientNode Source #

Memory-managed wrapper type.

Constructors

LinearGradientNode (ManagedPtr LinearGradientNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf LinearGradientNode o) => IsLinearGradientNode o Source #

Type class for types which can be safely cast to `LinearGradientNode`, for instance with `toLinearGradientNode`.

#### Instances

Instances details

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

toLinearGradientNode :: (MonadIO m, IsLinearGradientNode o) => o -> m LinearGradientNode Source #

Cast to `LinearGradientNode`, 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, getChildren, getColorStops, getEnd, getNColorStops, getNodeType, getOpaqueRect, getStart.

#### Setters

None.

## getColorStops

linearGradientNodeGetColorStops Source #

Arguments

:: (HasCallStack, MonadIO m, IsLinearGradientNode a) |
=> a | `node`: a `GskRenderNode` for a linear gradient
-> m [ColorStop] | Returns: the color stops in the gradient

Retrieves the color stops in the gradient.

## getEnd

linearGradientNodeGetEnd Source #

Arguments

:: (HasCallStack, MonadIO m, IsLinearGradientNode a) |
=> a | `node`: a `GskRenderNode` for a linear gradient
-> m Point | Returns: the final point

Retrieves the final point of the linear gradient.

## getNColorStops

linearGradientNodeGetNColorStops Source #

Arguments

:: (HasCallStack, MonadIO m, IsLinearGradientNode a) |
=> a | `node`: a `GskRenderNode` for a linear gradient
-> m CSize | Returns: the number of color stops

Retrieves the number of color stops in the gradient.

## getStart

linearGradientNodeGetStart Source #

Arguments

:: (HasCallStack, MonadIO m, IsLinearGradientNode a) |
=> a | `node`: a `GskRenderNode` for a linear gradient
-> m Point | Returns: the initial point

Retrieves the initial point of the linear gradient.

## new

linearGradientNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Rect | `bounds`: the rectangle to render the linear gradient into
-> Point | `start`: the point at which the linear gradient will begin
-> Point | `end`: the point at which the linear gradient will finish
-> [ColorStop] | `colorStops`: a pointer to an array of `GskColorStop` defining the gradient. The offsets of all color stops must be increasing. The first stop's offset must be >= 0 and the last stop's offset must be <= 1.
-> m LinearGradientNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that will create a linear gradient from the given points and color stops, and render that into the area given by `bounds`.