summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshot.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-02-21 04:24:24 +0100
committerBenjamin Otte <otte@redhat.com>2019-02-21 19:47:28 +0100
commit51fac44ba543f587e44b9c91d4d0eb6e7d90afb0 (patch)
treecb1d2818aa5cb3bbe8efb4ad043f4685b9a40f1e /gtk/gtksnapshot.h
parent2bdc0748e50d5b3e6d2dfc5c2210686b8ca0baad (diff)
downloadgtk+-51fac44ba543f587e44b9c91d4d0eb6e7d90afb0.tar.gz
snapshot: Introduce transform APIs
Instead of gtk_snapshot_offset(), provide a full set of functions kept in sync with GtkTransform APIs. On top of that, add gtk_snapshot_save() and gtk_snapshot_restore() mirroring cairo_save()/restore() that allow saving a snapshot's transform state.
Diffstat (limited to 'gtk/gtksnapshot.h')
-rw-r--r--gtk/gtksnapshot.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h
index 485d160fc0..abaf20f057 100644
--- a/gtk/gtksnapshot.h
+++ b/gtk/gtksnapshot.h
@@ -105,6 +105,38 @@ GDK_AVAILABLE_IN_ALL
void gtk_snapshot_pop (GtkSnapshot *snapshot);
GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_save (GtkSnapshot *snapshot);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_restore (GtkSnapshot *snapshot);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_transform (GtkSnapshot *snapshot,
+ GtkTransform *transform);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_transform_matrix (GtkSnapshot *snapshot,
+ const graphene_matrix_t*matrix);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_translate (GtkSnapshot *snapshot,
+ const graphene_point_t *point);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_translate_3d (GtkSnapshot *snapshot,
+ const graphene_point3d_t*point);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_rotate (GtkSnapshot *snapshot,
+ float angle);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_rotate_3d (GtkSnapshot *snapshot,
+ float angle,
+ const graphene_vec3_t *axis);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_scale (GtkSnapshot *snapshot,
+ float factor_x,
+ float factor_y);
+GDK_AVAILABLE_IN_ALL
+void gtk_snapshot_scale_3d (GtkSnapshot *snapshot,
+ float factor_x,
+ float factor_y,
+ float factor_z);
+GDK_AVAILABLE_IN_ALL
void gtk_snapshot_offset (GtkSnapshot *snapshot,
int x,
int y);