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

Contents

- Exported types
- Methods
  - getAngle
  - getCenter
  - getColorStops
  - getNColorStops
  - getRotation
  - new

Description

A render node for a conic gradient.

Synopsis

- newtype ConicGradientNode = ConicGradientNode (ManagedPtr ConicGradientNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf ConicGradientNode o) => IsConicGradientNode o
- toConicGradientNode :: (MonadIO m, IsConicGradientNode o) => o -> m ConicGradientNode
- conicGradientNodeGetAngle :: (HasCallStack, MonadIO m, IsConicGradientNode a) => a -> m Float
- conicGradientNodeGetCenter :: (HasCallStack, MonadIO m, IsConicGradientNode a) => a -> m Point
- conicGradientNodeGetColorStops :: (HasCallStack, MonadIO m, IsConicGradientNode a) => a -> m [ColorStop]
- conicGradientNodeGetNColorStops :: (HasCallStack, MonadIO m, IsConicGradientNode a) => a -> m CSize
- conicGradientNodeGetRotation :: (HasCallStack, MonadIO m, IsConicGradientNode a) => a -> m Float
- conicGradientNodeNew :: (HasCallStack, MonadIO m) => Rect -> Point -> Float -> [ColorStop] -> m ConicGradientNode

# Exported types

newtype ConicGradientNode Source #

Memory-managed wrapper type.

Constructors

ConicGradientNode (ManagedPtr ConicGradientNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf ConicGradientNode o) => IsConicGradientNode o Source #

Type class for types which can be safely cast to `ConicGradientNode`, for instance with `toConicGradientNode`.

#### Instances

Instances details

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

toConicGradientNode :: (MonadIO m, IsConicGradientNode o) => o -> m ConicGradientNode Source #

Cast to `ConicGradientNode`, 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

getAngle, getBounds, getCenter, getColorStops, getNColorStops, getNodeType, getOpaqueRect, getRotation.

#### Setters

None.

## getAngle

conicGradientNodeGetAngle Source #

Arguments

:: (HasCallStack, MonadIO m, IsConicGradientNode a) |
=> a | `node`: a `GskRenderNode` for a conic gradient
-> m Float | Returns: the angle for the gradient

Retrieves the angle for the gradient in radians, normalized in [0, 2 * PI].

The angle is starting at the top and going clockwise, as expressed in the css specification:

angle = 90 - `conicGradientNodeGetRotation`

Since: 4.2

## getCenter

conicGradientNodeGetCenter Source #

Arguments

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

Retrieves the center pointer for the gradient.

## getColorStops

conicGradientNodeGetColorStops Source #

Arguments

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

Retrieves the color stops in the gradient.

## getNColorStops

conicGradientNodeGetNColorStops Source #

Arguments

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

Retrieves the number of color stops in the gradient.

## getRotation

conicGradientNodeGetRotation Source #

Arguments

:: (HasCallStack, MonadIO m, IsConicGradientNode a) |
=> a | `node`: a `GskRenderNode` for a conic gradient
-> m Float | Returns: the rotation for the gradient

Retrieves the rotation for the gradient in degrees.

## new

conicGradientNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Rect | `bounds`: the bounds of the node
-> Point | `center`: the center of the gradient
-> Float | `rotation`: the rotation of the gradient in degrees
-> [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 ConicGradientNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that draws a conic gradient.

The conic gradient starts around `center` in the direction of `rotation`. A rotation of 0 means that the gradient points up. Color stops are then added clockwise.