Files
gimp/app/display/gimpdisplayshell-scale.h
Simon Budig 645a1ab652 Store the zoom factor as float, not as a ratio.
2004-01-29  Simon Budig  <simon@gimp.org>

	* app/display/gimpdisplayshell.[ch]: Store the zoom factor as
	float, not as a ratio.

	* app/display/gimpdisplayshell-scale.[ch]: change the API to
	expose the Float instead a weirdly encoded integer. Implement
	functions to get a ratio from the scale factor. Implement a set
	as presets as discussed on the mailinglist. Changed Zoom->Other
	dialog to enable entering a float.

	* app/display/gimpdisplayshell-title.c
	* app/display/gimpnavigationview.c
	* app/gui/image-menu.c
	* app/gui/info-window.c
	* app/tools/gimpmagnifytool.c: changed accordingly.

	* app/core/gimp.[ch]
	* app/display/gimpdisplay.[ch]
	* app/gui/gui-vtable.c
	* app/widgets/widgets-enums.h: Made the various display-creating
	functions accept a float for the scale. Introduce a new
	GimpZoomType: GIMP_ZOOM_TO. Generally adjust the API to use
	floats instead of weird integers.

	* app/core/gimp-edit.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/file/file-open.c
	* app/gui/image-commands.c
	* app/gui/view-commands.[ch]
	* tools/pdbgen/pdb/display.pdb
	* app/widgets/gimpimageview.c
	* app/widgets/gimptoolbox-dnd.c: changed accordingly

	* app/pdb/display_cmds.c: regenerated
2004-01-29 22:22:29 +00:00

52 lines
2.6 KiB
C

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_DISPLAY_SHELL_SCALE_H__
#define __GIMP_DISPLAY_SHELL_SCALE_H__
gdouble gimp_display_shell_scale_zoom_step (GimpZoomType zoom_type,
gdouble scale);
void gimp_display_shell_scale_get_fraction (gdouble zoom_factor,
gint *numerator,
gint *denominator);
void gimp_display_shell_scale_setup (GimpDisplayShell *shell);
void gimp_display_shell_scale_set_dot_for_dot (GimpDisplayShell *gdisp,
gboolean dot_for_dot);
void gimp_display_shell_scale (GimpDisplayShell *gdisp,
GimpZoomType zoom_type,
gdouble new_scale);
void gimp_display_shell_scale_fit (GimpDisplayShell *gdisp);
void gimp_display_shell_scale_by_values (GimpDisplayShell *gdisp,
gdouble scale,
gint offset_x,
gint offset_y,
gboolean resize_window);
void gimp_display_shell_scale_shrink_wrap (GimpDisplayShell *shell);
void gimp_display_shell_scale_resize (GimpDisplayShell *shell,
gboolean resize_window,
gboolean redisplay);
void gimp_display_shell_scale_dialog (GimpDisplayShell *shell);
#endif /* __GIMP_DISPLAY_SHELL_SCALE_H__ */