gi-gsk-4.0.4: 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.LinearGradientNode

Description

A render node for a linear gradient.

Synopsis

Exported types

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, getColorStops, getEnd, getNColorStops, getNodeType, 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 Word64

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.