Class: Gsk::ConicGradientNode
- Inherits:
-
RenderNode
- Object
- RenderNode
- Gsk::ConicGradientNode
- Defined in:
- (unknown)
Overview
A render node for a conic gradient.
Instance Method Summary collapse
-
#angle ⇒ Gsk::gfloat
Retrieves the angle for the gradient in radians, normalized in [0, 2 * PI].
-
#center ⇒ Graphene::Point
Retrieves the center pointer for the gradient.
-
#get_color_stops(n_stops) ⇒ Array<Gsk::ColorStop>
Retrieves the color stops in the gradient.
-
#initialize(bounds, center, rotation, color_stops, n_color_stops) ⇒ Gsk::ConicGradientNode
constructor
Creates a
GskRenderNodethat draws a conic gradient. -
#n_color_stops ⇒ Integer
Retrieves the number of color stops in the gradient.
-
#rotation ⇒ Gsk::gfloat
Retrieves the rotation for the gradient in degrees.
Methods inherited from RenderNode
deserialize, #draw, #get_bounds, #node_type, #ref, #serialize, #unref, #write_to_file
Constructor Details
#initialize(bounds, center, rotation, color_stops, n_color_stops) ⇒ 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.
Instance Method Details
#angle ⇒ Gsk::gfloat
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_conic_gradient_node_get_rotation()
#center ⇒ Graphene::Point
Retrieves the center pointer for the gradient.
#get_color_stops(n_stops) ⇒ Array<Gsk::ColorStop>
Retrieves the color stops in the gradient.
#n_color_stops ⇒ Integer
Retrieves the number of color stops in the gradient.
#rotation ⇒ Gsk::gfloat
Retrieves the rotation for the gradient in degrees.