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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 },
51 { N_("50%"), 0.7071067811 },
52 { N_("75%"), 0.8408964152 },
54 { N_("125%"), 1.1892071149 },
55 { N_("150%"), 1.4142135623 },
56 { N_("175%"), 1.6817928304 },
58 { N_("300%"), 2.8284271247 },
61 static const guint n_zoom_levels = G_N_ELEMENTS (zoom_levels);
63 #define ZOOM_MINIMAL (EPHY_ZOOM_SEPARATOR)
64 #define ZOOM_MAXIMAL (zoom_levels[n_zoom_levels - 4].level)
65 #define ZOOM_IN (-1.0)
66 #define ZOOM_OUT (-2.0)
68 guint ephy_zoom_get_zoom_level_index (float level);
70 float ephy_zoom_get_changed_zoom_level (float level, gint steps);
72 float ephy_zoom_get_nearest_zoom_level (float level);