summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshot.h
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-12-13 09:05:49 +0100
committerTimm Bäder <mail@baedert.org>2017-12-21 18:25:52 +0100
commit19871cfd68af11780d4549430ddeab3644d0bf76 (patch)
tree39c8ce5616caf95e9fa43952649b7188af518f8b /gtk/gtksnapshot.h
parentd9f1620b2fe46d90097dbbe96a867ac480d4408e (diff)
downloadgtk+-19871cfd68af11780d4549430ddeab3644d0bf76.tar.gz
snapshot: Add & use API for linear gradient nodes
This way, we can also clip the created node bounds to the current clip of the GtkSnapshot. This works as long as we don't modify the start and end points, and happens all the time while rendering.
Diffstat (limited to 'gtk/gtksnapshot.h')
-rw-r--r--gtk/gtksnapshot.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h
index e1a1e2a6d2..5d9657d01b 100644
--- a/gtk/gtksnapshot.h
+++ b/gtk/gtksnapshot.h
@@ -166,6 +166,25 @@ void gtk_snapshot_render_insertion_cursor (GtkSnapshot
PangoLayout *layout,
int index,
PangoDirection direction);
+GDK_AVAILABLE_IN_3_94
+void gtk_snapshot_append_linear_gradient (GtkSnapshot *snapshot,
+ const graphene_rect_t *bounds,
+ const graphene_point_t *start_point,
+ const graphene_point_t *end_point,
+ const GskColorStop *stops,
+ gsize n_stops,
+ const char *name,
+ ...) G_GNUC_PRINTF (7, 8);
+GDK_AVAILABLE_IN_3_94
+void gtk_snapshot_append_repeating_linear_gradient (GtkSnapshot *snapshot,
+ const graphene_rect_t *bounds,
+ const graphene_point_t *start_point,
+ const graphene_point_t *end_point,
+ const GskColorStop *stops,
+ gsize n_stops,
+ const char *name,
+ ...) G_GNUC_PRINTF (7, 8);
+
G_END_DECLS