Gsk.LinearGradientNode

g Gsk.LinearGradientNode Gsk.LinearGradientNode Gsk.RenderNode Gsk.RenderNode Gsk.RenderNode->Gsk.LinearGradientNode

Subclasses:

None

Methods

Inherited:

Gsk.RenderNode (8)

class

new (bounds, start, end, color_stops)

get_color_stops ()

get_end ()

get_n_color_stops ()

get_start ()

Virtual Methods

None

Fields

None

Class Details

class Gsk.LinearGradientNode
Bases:

Gsk.RenderNode

Abstract:

No

A render node for a linear gradient.

classmethod new(bounds, start, end, color_stops)
Parameters:
  • bounds (Graphene.Rect) – the rectangle to render the linear gradient into

  • start (Graphene.Point) – the point at which the linear gradient will begin

  • end (Graphene.Point) – the point at which the linear gradient will finish

  • color_stops ([Gsk.ColorStop]) – 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.

Returns:

A new GskRenderNode

Return type:

Gsk.LinearGradientNode

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.

get_color_stops()
Returns:

the color stops in the gradient

Return type:

[Gsk.ColorStop]

Retrieves the color stops in the gradient.

get_end()
Returns:

the final point

Return type:

Graphene.Point

Retrieves the final point of the linear gradient.

get_n_color_stops()
Returns:

the number of color stops

Return type:

int

Retrieves the number of color stops in the gradient.

get_start()
Returns:

the initial point

Return type:

Graphene.Point

Retrieves the initial point of the linear gradient.