CtkGestureZoom: CTK+ 3 Reference Manual

## CtkGestureZoom CtkGestureZoom — Zoom gesture |

## Functions

CtkGesture * | ctk_gesture_zoom_new ()
gdouble | ctk_gesture_zoom_get_scale_delta ()

## Signals

void | scale-changed | Run First

## Types and Values

| CtkGestureZoom

## Object Hierarchy

        GObject
        ╰── CtkEventController
            ╰── CtkGesture
                ╰── CtkGestureZoom

## Includes

    #include <ctk/ctk.h>

## Description

CtkGestureZoom is a CtkGesture implementation able to recognize pinch/zoom gestures, whenever the distance between both tracked sequences changes, the “scale-changed” signal is emitted to report the scale factor.

## Functions

### ctk_gesture_zoom_new ()

    CtkGesture *
    ctk_gesture_zoom_new (CtkWidget *widget);

Returns a newly created CtkGesture that recognizes zoom in/out gestures (usually known as pinch/zoom).

#### Parameters

widget | a CtkWidget |

#### Returns

a newly created CtkGestureZoom

Since: 3.14

### ctk_gesture_zoom_get_scale_delta ()

    gdouble
    ctk_gesture_zoom_get_scale_delta (CtkGestureZoom *gesture);

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.

#### Parameters

gesture | a CtkGestureZoom |

#### Returns

the scale delta

Since: 3.14

## Types and Values

### CtkGestureZoom

    typedef struct _CtkGestureZoom CtkGestureZoom;

## Signal Details

### The `“scale-changed”` signal

    void
    user_function (CtkGestureZoom *controller,
                   double          scale,
                   gpointer        user_data)

This signal is emitted whenever the distance between both tracked sequences changes.

#### Parameters

controller | the object on which the signal is emitted |
scale | Scale delta, taking the initial state as 1:1 |
user_data | user data set when the signal handler was connected. |

Flags: Run First

Since: 3.14

## See Also

CtkGestureRotate