diff options
author | Timm Bäder <mail@baedert.org> | 2017-12-13 09:05:49 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-12-21 18:25:52 +0100 |
commit | 19871cfd68af11780d4549430ddeab3644d0bf76 (patch) | |
tree | 39c8ce5616caf95e9fa43952649b7188af518f8b /gtk/gtksnapshot.h | |
parent | d9f1620b2fe46d90097dbbe96a867ac480d4408e (diff) | |
download | gtk+-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.h | 19 |
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 |