:right-sidebar: True GestureZoom =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: GestureZoom(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Gesture`, :class:`~gi.repository.Gtk.EventController`, :class:`~gi.repository.GObject.Object` ``GtkGestureZoom`` is a ``GtkGesture`` for 2-finger pinch/zoom gestures. Whenever the distance between both tracked sequences changes, the :obj:`~gi.repository.Gtk.GestureZoom.signals.scale_changed` signal is emitted to report the scale factor. Constructors ------------ .. rst-class:: interim-class .. class:: GestureZoom :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Gesture Returns a newly created ``GtkGesture`` that recognizes pinch/zoom gestures. Methods ------- .. rst-class:: interim-class .. class:: GestureZoom :no-index: .. method:: get_scale_delta() -> float Gets the scale delta. If ``gesture`` is active, this function returns the zooming difference since the gesture was recognized (hence the starting point is considered 1:1). If ``gesture`` is not active, 1 is returned. Signals ------- .. rst-class:: interim-class .. class:: GestureZoom.signals :no-index: .. method:: scale_changed(scale: float) -> None Emitted whenever the distance between both tracked sequences changes. :param scale: Scale delta, taking the initial state as 1:1