Gnome::Gtk4::GestureZoom
Table of Contents
Description§
Gnome::Gtk4::GestureZoom is a Gnome::Gtk4::Gesture for 2-finger pinch/zoom gestures.
Whenever the distance between both tracked sequences changes, the scale-changed signal is emitted to report the scale factor.
Uml Diagram§
UNKNOWN image§
=for image :class<inline> :src<asset_files/images/plantuml/GestureZoom.png> :width<70\%>Class initialization§
new§
:native-object§
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
Code
new-gesturezoom§
Returns a newly created Gnome::Gtk4::Gesture that recognizes pinch/zoom gestures.
method new-gesturezoom ( --> Gnome::Gtk4::GestureZoom )
Code
Methods§
get-scale-delta§
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.
method get-scale-delta (--> Num )
Code
Return value; the scale delta.
Signals§
scale-changed§
Emitted whenever the distance between both tracked sequences changes.
method handler ( gdouble $scale, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::GestureZoom :$_widget, *%user-options )
Code
- $scale; Scale delta, taking the initial state as 1:1.
- $_handle_id; The registered event handler id.
- $_native-object; The native object provided by the Raku object which registered this event. This is a native Gnome::Gtk4::GestureZoom object.
- %user-options; A list of named arguments provided by .register-signal() in class Object.
About my projects, examples and tutorials