2 * Copyright (C) 2003 Christian Persch
4 * Modified 2005 by James Bowes for use in evince.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31 #include <glib/gi18n.h>
35 #define EPHY_ZOOM_BEST_FIT (-3.0)
36 #define EPHY_ZOOM_FIT_WIDTH (-4.0)
37 #define EPHY_ZOOM_SEPARATOR (-5.0)
48 { N_("Best Fit"), EPHY_ZOOM_BEST_FIT },
49 { N_("Fit Page Width"), EPHY_ZOOM_FIT_WIDTH },
50 { NULL, EPHY_ZOOM_SEPARATOR },
52 { N_("70%"), 0.7071067811 },
53 { N_("85%"), 0.8408964152 },
55 { N_("125%"), 1.1892071149 },
56 { N_("150%"), 1.4142135623 },
57 { N_("175%"), 1.6817928304 },
59 { N_("300%"), 2.8284271247 },
62 { N_("1600%"), 16.0 },
63 { N_("3200%"), 32.0 },
66 static const guint n_zoom_levels = G_N_ELEMENTS (zoom_levels);
68 #define ZOOM_MINIMAL (EPHY_ZOOM_SEPARATOR)
69 #define ZOOM_MAXIMAL (zoom_levels[n_zoom_levels - 1].level)
70 #define ZOOM_IN (-1.0)
71 #define ZOOM_OUT (-2.0)
73 guint ephy_zoom_get_zoom_level_index (float level);
75 float ephy_zoom_get_changed_zoom_level (float level, gint steps);
77 float ephy_zoom_get_nearest_zoom_level (float level);