Gsk.RadialGradientNode

g Gsk.RadialGradientNode Gsk.RadialGradientNode Gsk.RenderNode Gsk.RenderNode Gsk.RenderNode->Gsk.RadialGradientNode

Subclasses:

None

Methods

Inherited:

Gsk.RenderNode (8)

class

new (bounds, center, hradius, vradius, start, end, color_stops)

get_center ()

get_color_stops ()

get_end ()

get_hradius ()

get_n_color_stops ()

get_start ()

get_vradius ()

Virtual Methods

None

Fields

None

Class Details

class Gsk.RadialGradientNode
Bases:

Gsk.RenderNode

Abstract:

No

A render node for a radial gradient.

classmethod new(bounds, center, hradius, vradius, start, end, color_stops)
Parameters:
  • bounds (Graphene.Rect) – the bounds of the node

  • center (Graphene.Point) – the center of the gradient

  • hradius (float) – the horizontal radius

  • vradius (float) – the vertical radius

  • start (float) – a percentage >= 0 that defines the start of the gradient around center

  • end (float) – a percentage >= 0 that defines the end of the gradient around center

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

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.

get_center()
Returns:

the center point for the gradient

Return type:

Graphene.Point

Retrieves the center pointer for the gradient.

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 end value for the gradient

Return type:

float

Retrieves the end value for the gradient.

get_hradius()
Returns:

the horizontal radius for the gradient

Return type:

float

Retrieves the horizontal radius for the 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 start value for the gradient

Return type:

float

Retrieves the start value for the gradient.

get_vradius()
Returns:

the vertical radius for the gradient

Return type:

float

Retrieves the vertical radius for the gradient.