gi-gsk-4.0.5: Gsk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gsk.Objects.ConicGradientNode

Description

A render node for a conic gradient.

Synopsis

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

BoxedPtr ConicGradientNode Source # 
Instance details

Defined in GI.Gsk.Objects.ConicGradientNode

ManagedPtrNewtype ConicGradientNode Source # 
Instance details

Defined in GI.Gsk.Objects.ConicGradientNode

TypedObject ConicGradientNode Source # 
Instance details

Defined in GI.Gsk.Objects.ConicGradientNode

Methods

glibType :: IO GType

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, 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 Word64

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.