Gsk.ConicGradientNode¶
- Subclasses:
None
Methods¶
- Inherited:
class |
|
|
|
|
|
|
Virtual Methods¶
None
Fields¶
None
Class Details¶
- class Gsk.ConicGradientNode¶
- Bases:
- Abstract:
No
A render node for a conic gradient.
- classmethod new(bounds, center, rotation, color_stops)¶
- Parameters:
bounds (
Graphene.Rect
) – the bounds of the nodecenter (
Graphene.Point
) – the center of the gradientrotation (
float
) – the rotation of the gradient in degreescolor_stops ([
Gsk.ColorStop
]) – a pointer to an array ofGskColorStop
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:
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:
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:
Retrieves the center pointer for the gradient.
- get_color_stops()¶
- Returns:
the color stops in the gradient
- Return type:
Retrieves the color stops in the gradient.
- get_n_color_stops()¶
- Returns:
the number of color stops
- Return type:
Retrieves the number of color stops in the gradient.