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

Contents

- Exported types
- Methods
  - getCenter
  - getColorStops
  - getEnd
  - getHradius
  - getNColorStops
  - getStart
  - getVradius
  - new

Description

A render node for a radial gradient.

Synopsis

- newtype RadialGradientNode = RadialGradientNode (ManagedPtr RadialGradientNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf RadialGradientNode o) => IsRadialGradientNode o
- toRadialGradientNode :: (MonadIO m, IsRadialGradientNode o) => o -> m RadialGradientNode
- radialGradientNodeGetCenter :: (HasCallStack, MonadIO m, IsRadialGradientNode a) => a -> m Point
- radialGradientNodeGetColorStops :: (HasCallStack, MonadIO m, IsRadialGradientNode a) => a -> m [ColorStop]
- radialGradientNodeGetEnd :: (HasCallStack, MonadIO m, IsRadialGradientNode a) => a -> m Float
- radialGradientNodeGetHradius :: (HasCallStack, MonadIO m, IsRadialGradientNode a) => a -> m Float
- radialGradientNodeGetNColorStops :: (HasCallStack, MonadIO m, IsRadialGradientNode a) => a -> m CSize
- radialGradientNodeGetStart :: (HasCallStack, MonadIO m, IsRadialGradientNode a) => a -> m Float
- radialGradientNodeGetVradius :: (HasCallStack, MonadIO m, IsRadialGradientNode a) => a -> m Float
- radialGradientNodeNew :: (HasCallStack, MonadIO m) => Rect -> Point -> Float -> Float -> Float -> Float -> [ColorStop] -> m RadialGradientNode

# Exported types

newtype RadialGradientNode Source #

Memory-managed wrapper type.

Constructors

RadialGradientNode (ManagedPtr RadialGradientNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf RadialGradientNode o) => IsRadialGradientNode o Source #

Type class for types which can be safely cast to `RadialGradientNode`, for instance with `toRadialGradientNode`.

#### Instances

Instances details

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

toRadialGradientNode :: (MonadIO m, IsRadialGradientNode o) => o -> m RadialGradientNode Source #

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

#### Setters

None.

## getCenter

radialGradientNodeGetCenter Source #

Arguments

:: (HasCallStack, MonadIO m, IsRadialGradientNode a) |
=> a | `node`: a `GskRenderNode` for a radial gradient
-> m Point | Returns: the center point for the gradient

Retrieves the center pointer for the gradient.

## getColorStops

radialGradientNodeGetColorStops Source #

Arguments

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

Retrieves the color stops in the gradient.

## getEnd

radialGradientNodeGetEnd Source #

Arguments

:: (HasCallStack, MonadIO m, IsRadialGradientNode a) |
=> a | `node`: a `GskRenderNode` for a radial gradient
-> m Float | Returns: the end value for the gradient

Retrieves the end value for the gradient.

## getHradius

radialGradientNodeGetHradius Source #

Arguments

:: (HasCallStack, MonadIO m, IsRadialGradientNode a) |
=> a | `node`: a `GskRenderNode` for a radial gradient
-> m Float | Returns: the horizontal radius for the gradient

Retrieves the horizontal radius for the gradient.

## getNColorStops

radialGradientNodeGetNColorStops Source #

Arguments

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

Retrieves the number of color stops in the gradient.

## getStart

radialGradientNodeGetStart Source #

Arguments

:: (HasCallStack, MonadIO m, IsRadialGradientNode a) |
=> a | `node`: a `GskRenderNode` for a radial gradient
-> m Float | Returns: the start value for the gradient

Retrieves the start value for the gradient.

## getVradius

radialGradientNodeGetVradius Source #

Arguments

:: (HasCallStack, MonadIO m, IsRadialGradientNode a) |
=> a | `node`: a `GskRenderNode` for a radial gradient
-> m Float | Returns: the vertical radius for the gradient

Retrieves the vertical radius for the gradient.

## new

radialGradientNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Rect | `bounds`: the bounds of the node
-> Point | `center`: the center of the gradient
-> Float | `hradius`: the horizontal radius
-> Float | `vradius`: the vertical radius
-> Float | `start`: a percentage >= 0 that defines the start of the gradient around `center`
-> Float | `end`: a percentage >= 0 that defines the end of the gradient around `center`
-> [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 RadialGradientNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that draws a radial gradient.

The radial gradient starts around `center`. The size of the gradient is dictated by `hradius` in horizontal orientation and by `vradius` in vertical orientation.