gtkzooms

gtkzooms — Functions for dealing with zoom factors

Functions

Description

GtkImageView uses a discrete amount of zoom factors for determining which zoom to set. Using these functions, it is possible to retrieve information and manipulate a zoom factor.

Functions

gtk_zooms_get_zoom_in ()

gdouble
gtk_zooms_get_zoom_in (gdouble zoom);

Returns the zoom factor that is one step larger than the supplied zoom factor.

Parameters

zoom

A zoom factor.

 

Returns

a zoom factor that is one step larger than the supplied one


gtk_zooms_get_zoom_out ()

gdouble
gtk_zooms_get_zoom_out (gdouble zoom);

Returns the zoom factor that is one step smaller than the supplied zoom factor.

Parameters

zoom

a zoom factor

 

Returns

a zoom factor that is one step smaller than the supplied one.


gtk_zooms_get_min_zoom ()

gdouble
gtk_zooms_get_min_zoom (void);

Returns the minimum allowed zoom factor.

Returns

The minimal zoom factor.


gtk_zooms_get_max_zoom ()

gdouble
gtk_zooms_get_max_zoom (void);

Returns the maximum allowed zoom factor.

Returns

The maximal zoom factor.


gtk_zooms_clamp_zoom ()

gdouble
gtk_zooms_clamp_zoom (gdouble zoom);

Returns the zoom factor clamped to the minumum and maximum allowed value.

Parameters

zoom

A zoom factor

 

Returns

The zoom factor clamped to the interval [min, max].

Types and Values