GtkSnapshot *snapshot;
GdkPaintable *paintable;
- snapshot = gtk_snapshot_new (FALSE, NULL, "ColorDragIcon");
+ snapshot = gtk_snapshot_new (FALSE, "ColorDragIcon");
gtk_snapshot_append_color (snapshot,
rgba,
&GRAPHENE_RECT_INIT(0, 0, 48, 32),
GtkSnapshot *snapshot;
GdkPaintable *paintable;
- snapshot = gtk_snapshot_new (FALSE, NULL, "ColorDragIcon");
+ snapshot = gtk_snapshot_new (FALSE, "ColorDragIcon");
gtk_snapshot_append_color (snapshot,
color,
&GRAPHENE_RECT_INIT(0, 0, 48, 32),
{
GtkSnapshot *snapshot;
GskRenderNode *node;
- cairo_region_t *clip;
g_return_if_fail (GTK_IS_CSS_IMAGE (image));
g_return_if_fail (cr != NULL);
cairo_save (cr);
- clip = cairo_region_create_rectangle (&(cairo_rectangle_int_t) { 0, 0, width, height });
- snapshot = gtk_snapshot_new (FALSE, clip, "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
+ snapshot = gtk_snapshot_new (FALSE, "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
gtk_css_image_snapshot (image, snapshot, width, height);
node = gtk_snapshot_free_to_node (snapshot);
gsk_render_node_unref (node);
}
- cairo_region_destroy (clip);
-
cairo_restore (cr);
}
if (index == item->index)
{
- snapshot = gtk_snapshot_new (FALSE, NULL, "IconView DragIcon");
+ snapshot = gtk_snapshot_new (FALSE, "IconView DragIcon");
gtk_icon_view_snapshot_item (icon_view, snapshot, item,
icon_view->priv->item_padding,
icon_view->priv->item_padding,
GtkSnapshot *child_snapshot;
child_snapshot = gtk_snapshot_new (gtk_snapshot_get_record_names (snapshot),
- NULL,
"OverlayCaptureMainChild");
gtk_snapshot_offset (child_snapshot, main_alloc.x, main_alloc.y);
gtk_widget_snapshot (main_widget, child_snapshot);
/**
* gtk_snapshot_new:
* @record_names: whether to keep node names (for debugging purposes)
- * @clip: (nullable): the clip region to use, or %NULL
* @name: a printf-style format string to create the node name
* @...: arguments for @name
*
* Returns: a newly-allocated #GtkSnapshot
*/
GtkSnapshot *
-gtk_snapshot_new (gboolean record_names,
- const cairo_region_t *clip,
- const char *name,
+gtk_snapshot_new (gboolean record_names,
+ const char *name,
...)
{
char *str;
str = NULL;
return gtk_snapshot_new_internal (record_names,
- (cairo_region_t *) clip,
+ NULL,
str);
}
GDK_AVAILABLE_IN_ALL
GtkSnapshot * gtk_snapshot_new (gboolean record_names,
- const cairo_region_t *clip,
const char *name,
- ...) G_GNUC_PRINTF (3, 4);
+ ...) G_GNUC_PRINTF (2, 3);
GDK_AVAILABLE_IN_ALL
GskRenderNode * gtk_snapshot_free_to_node (GtkSnapshot *snapshot);
GDK_AVAILABLE_IN_ALL
gtk_widget_get_allocation (priv->last_visible_child->widget,
&priv->last_visible_surface_allocation);
last_visible_snapshot = gtk_snapshot_new (gtk_snapshot_get_record_names (snapshot),
- NULL,
"StackCaptureLastVisibleChild");
gtk_widget_snapshot (priv->last_visible_child->widget, last_visible_snapshot);
priv->last_visible_node = gtk_snapshot_free_to_node (last_visible_snapshot);
limit_layout_lines (layout);
- snapshot = gtk_snapshot_new (FALSE, NULL, "TextDragIcon");
+ snapshot = gtk_snapshot_new (FALSE, "TextDragIcon");
style_context = gtk_widget_get_style_context (widget);
gtk_style_context_get_color (style_context,
layout_width = MIN (layout_width, DRAG_ICON_MAX_WIDTH);
layout_height = MIN (layout_height, DRAG_ICON_MAX_HEIGHT);
- snapshot = gtk_snapshot_new (FALSE, NULL, "RichTextDragIcon");
+ snapshot = gtk_snapshot_new (FALSE, "RichTextDragIcon");
cr = gtk_snapshot_append_cairo (snapshot,
&GRAPHENE_RECT_INIT (0, 0, layout_width, layout_height),
"Text");
bin_window_width = gtk_widget_get_width (GTK_WIDGET (tree_view));
- snapshot = gtk_snapshot_new (FALSE, NULL, "TreeView DragIcon");
+ snapshot = gtk_snapshot_new (FALSE, "TreeView DragIcon");
gtk_snapshot_render_background (snapshot, context,
0, 0,
if (mode == RENDER_SNAPSHOT)
{
GtkSnapshot *snapshot;
- cairo_region_t *clip;
GskRenderNode *node;
- clip = cairo_region_create_rectangle (&(cairo_rectangle_int_t) {
- widget->priv->clip.x - widget->priv->allocation.x,
- widget->priv->clip.y - widget->priv->allocation.y,
- widget->priv->clip.width,
- widget->priv->clip.height});
- snapshot = gtk_snapshot_new (FALSE, clip, "Fallback<%s>", G_OBJECT_TYPE_NAME (widget));
+ snapshot = gtk_snapshot_new (FALSE, "Fallback<%s>", G_OBJECT_TYPE_NAME (widget));
gtk_widget_snapshot (widget, snapshot);
node = gtk_snapshot_free_to_node (snapshot);
if (node != NULL)
gsk_render_node_draw (node, cr);
gsk_render_node_unref (node);
}
-
- cairo_region_destroy (clip);
}
else
{
return;
snapshot = gtk_snapshot_new (should_record_names (widget, renderer),
- NULL,
"Render<%s>", G_OBJECT_TYPE_NAME (widget));
gtk_widget_snapshot (widget, snapshot);
root = gtk_snapshot_free_to_node (snapshot);
row = gtk_widget_get_ancestor (widget, GTK_TYPE_LIST_BOX_ROW);
gtk_widget_get_allocation (row, &alloc);
- snapshot = gtk_snapshot_new (FALSE, NULL, "DragIcon");
+ snapshot = gtk_snapshot_new (FALSE, "DragIcon");
cr = gtk_snapshot_append_cairo (snapshot,
&GRAPHENE_RECT_INIT(0, 0, alloc.width, alloc.height),
"DragText");