RadialGradientNode

class RadialGradientNode(*args, **kwargs)

Superclasses: RenderNode

A render node for a radial gradient.

Constructors

class RadialGradientNode
classmethod new(bounds: Rect, center: Point, hradius: float, vradius: float, start: float, end: float, color_stops: Sequence[ColorStop]) 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.

Parameters:
  • bounds – the bounds of the node

  • center – the center of the gradient

  • hradius – the horizontal radius

  • vradius – the vertical radius

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

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

  • 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

class RadialGradientNode
get_center() Point

Retrieves the center pointer for the gradient.

get_color_stops() list[ColorStop]

Retrieves the color stops in the gradient.

get_end() float

Retrieves the end value for the gradient.

get_hradius() float

Retrieves the horizontal radius for the gradient.

get_n_color_stops() int

Retrieves the number of color stops in the gradient.

get_start() float

Retrieves the start value for the gradient.

get_vradius() float

Retrieves the vertical radius for the gradient.