/**
* gsk_blur_node_new:
* @child: the child node to blur
- * @radius: the blur radius
+ * @radius: the blur radius. Must be positive
*
* Creates a render node that blurs the child.
*
float clip_radius;
g_return_val_if_fail (GSK_IS_RENDER_NODE (child), NULL);
+ g_return_val_if_fail (radius >= 0, NULL);
self = gsk_render_node_alloc (GSK_BLUR_NODE);
node = (GskRenderNode *) self;
if (radius == 0.0)
return node;
+ if (radius < 0)
+ return node;
+
blur_node = gsk_blur_node_new (node, radius);
gsk_render_node_unref (node);
/**
* gtk_snapshot_push_blur:
* @snapshot: a `GtkSnapshot`
- * @radius: the blur radius to use
+ * @radius: the blur radius to use. Must be positive
*
* Blurs an image.
*