1.12 <GskConicGradientNode>

Class: <GskConicGradientNode>

It derives from <GskRenderNode>.

A render node for a conic gradient.

Procedures

Method: conic-gradient-node:get-angle self ⇒ %return
Method: get-angle self ⇒ %return

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 - conic-gradient-node:get-rotation

self

Passed: a <GskConicGradientNode>.

a <GskRenderNode> for a conic gradient

%return

Returned: a real number.

the angle for the gradient

Method: conic-gradient-node:get-center self ⇒ %return
Method: get-center self ⇒ %return

Retrieves the center pointer for the gradient.

self

Passed: a <GskConicGradientNode>.

a <GskRenderNode> for a conic gradient

%return

Returned: a <GraphenePoint>.

the center point for the gradient

Method: conic-gradient-node:get-color-stops self ⇒ %return
Method: get-color-stops self ⇒ %return

Retrieves the color stops in the gradient.

self

Passed: a <GskConicGradientNode>.

a <GskRenderNode> for a conic gradient

%return

Returned: a vector, each a <GskColorStop>.

the color stops in the gradient

n-stops

Not returned: it is the length of %return.

the number of color stops in the returned array

Method: conic-gradient-node:get-n-color-stops self ⇒ %return
Method: get-n-color-stops self ⇒ %return

Retrieves the number of color stops in the gradient.

self

Passed: a <GskConicGradientNode>.

a <GskRenderNode> for a conic gradient

%return

Returned: an unsigned 64-bit integer.

the number of color stops

Method: conic-gradient-node:get-rotation self ⇒ %return
Method: get-rotation self ⇒ %return

Retrieves the rotation for the gradient in degrees.

self

Passed: a <GskConicGradientNode>.

a <GskRenderNode> for a conic gradient

%return

Returned: a real number.

the rotation for the gradient

Procedure: conic-gradient-node:new bounds center rotation color-stops ⇒ %return

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.

bounds

Passed: a <GrapheneRect>.

the bounds of the node

center

Passed: a <GraphenePoint>.

the center of the gradient

rotation

Passed: a real number.

the rotation of the gradient in degrees

color-stops

Passed: a list or vector, each a <GskColorStop>.

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.

%return

Returned: a <GskConicGradientNode>.

A new <GskRenderNode>

n-color-stops

Not passed: guile-gi gives the length of color-stops.

the number of elements in color-stops