:right-sidebar: True ConicGradientNode =================================================================== .. currentmodule:: gi.repository.Gsk .. class:: ConicGradientNode(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gsk.RenderNode` A render node for a conic gradient. Constructors ------------ .. rst-class:: interim-class .. class:: ConicGradientNode :no-index: .. classmethod:: new(bounds: ~gi.repository.Graphene.Rect, center: ~gi.repository.Graphene.Point, rotation: float, color_stops: list[~gi.repository.Gsk.ColorStop]) -> ~gi.repository.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. :param bounds: the bounds of the node :param center: the center of the gradient :param rotation: the rotation of the gradient in degrees :param color_stops: 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. Methods ------- .. rst-class:: interim-class .. class:: ConicGradientNode :no-index: .. method:: get_angle() -> 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 - :func:`~gi.repository.Gsk.ConicGradientNode.get_rotation` .. versionadded:: 4.2 .. method:: get_center() -> ~gi.repository.Graphene.Point Retrieves the center pointer for the gradient. .. method:: get_color_stops() -> list[~gi.repository.Gsk.ColorStop] Retrieves the color stops in the gradient. .. method:: get_n_color_stops() -> int Retrieves the number of color stops in the gradient. .. method:: get_rotation() -> float Retrieves the rotation for the gradient in degrees.