:right-sidebar: True LinearGradientNode =================================================================== .. currentmodule:: gi.repository.Gsk .. class:: LinearGradientNode(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gsk.RenderNode` A render node for a linear gradient. Constructors ------------ .. rst-class:: interim-class .. class:: LinearGradientNode :no-index: .. classmethod:: new(bounds: ~gi.repository.Graphene.Rect, start: ~gi.repository.Graphene.Point, end: ~gi.repository.Graphene.Point, color_stops: list[~gi.repository.Gsk.ColorStop]) -> ~gi.repository.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``\. :param bounds: the rectangle to render the linear gradient into :param start: the point at which the linear gradient will begin :param end: the point at which the linear gradient will finish :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:: LinearGradientNode :no-index: .. method:: get_color_stops() -> list[~gi.repository.Gsk.ColorStop] Retrieves the color stops in the gradient. .. method:: get_end() -> ~gi.repository.Graphene.Point Retrieves the final point of the linear gradient. .. method:: get_n_color_stops() -> int Retrieves the number of color stops in the gradient. .. method:: get_start() -> ~gi.repository.Graphene.Point Retrieves the initial point of the linear gradient.