Gsk.ConicGradientNode

g Gsk.ConicGradientNode Gsk.ConicGradientNode Gsk.RenderNode Gsk.RenderNode Gsk.RenderNode->Gsk.ConicGradientNode

Subclasses:

None

Methods

Inherited:

Gsk.RenderNode (8)

class

new (bounds, center, rotation, color_stops)

get_angle ()

get_center ()

get_color_stops ()

get_n_color_stops ()

get_rotation ()

Virtual Methods

None

Fields

None

Class Details

class Gsk.ConicGradientNode
Bases:

Gsk.RenderNode

Abstract:

No

A render node for a conic gradient.

classmethod new(bounds, center, rotation, color_stops)
Parameters:
  • bounds (Graphene.Rect) – the bounds of the node

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

  • rotation (float) – the rotation of the gradient in degrees

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

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.

get_angle()
Returns:

the angle for the gradient

Return type:

float

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 - Gsk.ConicGradientNode.get_rotation()

New in version 4.2.

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_n_color_stops()
Returns:

the number of color stops

Return type:

int

Retrieves the number of color stops in the gradient.

get_rotation()
Returns:

the rotation for the gradient

Return type:

float

Retrieves the rotation for the gradient in degrees.