Implement LinearGradientNode: peek_color_stops()
@@ -86,7 +86,6 @@ subtype!(RoundedClipNode = RoundedClipNode);
subtype!(TextNode = TextNode);
subtype!(TextureNode = TextureNode);
-// TODO: linear_gradient_node_peek_color_stops()
// TODO: repeating_linear_gradient_node_new()
// TODO: text_node_peek_glyphs()
@@ -423,6 +422,14 @@ impl LinearGradientNode {
node.try_into().unwrap()
}
+ pub fn peek_color_stops(self: &LinearGradientNode) -> Vec<ColorStop> {
+ assert_initialized_main_thread!();
+ let n = self.get_n_color_stops();
+ unsafe {
+ FromGlibContainerAsVec::from_glib_none_num_as_vec(gsk_sys::gsk_linear_gradient_node_peek_color_stops(self.to_glib_none().0), n)
+ }
+ }
+
pub fn peek_end(self: &LinearGradientNode) -> graphene::Point {
assert_initialized_main_thread!();
unsafe {
