summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshot.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-04-02 06:15:50 +0200
committerBenjamin Otte <otte@redhat.com>2018-04-05 14:56:39 +0200
commitffc7b2bb0afd04cacbe45cff6f27eb5d644d5b2b (patch)
tree620bed58191f6d4985cf8e09693c79bba0aeda02 /gtk/gtksnapshot.h
parent12fedca726d42f2087ffc3c5621eeb6757265319 (diff)
downloadgtk+-ffc7b2bb0afd04cacbe45cff6f27eb5d644d5b2b.tar.gz
snapshot: Allow passing the bounds of the created paintable
This allows being more specific about the size. It's useful in particular when the resulting render nodes might be too small for the size, not only when they are too large. For the latter case, using a clip node would be enough. It also requires adding a clip node when rendering the resulting paintable, but that should be optimized out by GtkSnapshot when not necessary.
Diffstat (limited to 'gtk/gtksnapshot.h')
-rw-r--r--gtk/gtksnapshot.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h
index 14cb20470d..7647a6b092 100644
--- a/gtk/gtksnapshot.h
+++ b/gtk/gtksnapshot.h
@@ -58,12 +58,14 @@ GtkSnapshot * gtk_snapshot_new (gboolean
GDK_AVAILABLE_IN_ALL
GskRenderNode * gtk_snapshot_free_to_node (GtkSnapshot *snapshot);
GDK_AVAILABLE_IN_ALL
-GdkPaintable * gtk_snapshot_free_to_paintable (GtkSnapshot *snapshot);
+GdkPaintable * gtk_snapshot_free_to_paintable (GtkSnapshot *snapshot,
+ const graphene_size_t *size);
GDK_AVAILABLE_IN_ALL
GskRenderNode * gtk_snapshot_to_node (GtkSnapshot *snapshot);
GDK_AVAILABLE_IN_ALL
-GdkPaintable * gtk_snapshot_to_paintable (GtkSnapshot *snapshot);
+GdkPaintable * gtk_snapshot_to_paintable (GtkSnapshot *snapshot,
+ const graphene_size_t *size);
GDK_AVAILABLE_IN_ALL
gboolean gtk_snapshot_get_record_names (GtkSnapshot *snapshot);