
2002-02-17 Michael Natterer <mitch@gimp.org> Fixed #34633 (wheel mouse zooming leaves straigth-line helpline on image) and maybe some other stuff caused by the misbehaviour described below: * app/tools/tools-types.h * app/tools/tool_manager.c (tool_manager_control_active): Removed the "PAUSED" ToolState. The possible state transitions were INACTIVE <-> ACTIVE <-> PAUSED, where the ACTIVE <-> PAUSED transition was done only in the tool_manager, causing the tools's control() never to be called when the tool was INACTIVE. The GimpPaintTool however wants to draw on the display when it's INACTIVE, and of course wants to be suspended/resumed correctly while fiddling with display repainting/scaling/... The PAUSED state was also redundant information, since (tool->paused_count > 0) is the same information (only more correct and independent of tool activity). * app/display/gimpdisplayshell-scale.[ch]: suspend/resume the active tool around _all_ changes to the display's "scale" and "offset" fields. Added new function gimp_display_shell_scale_by_values() which does that and is called from all places which need to change these values. * app/tools/gimpmagnifytool.c: changed accordingly. Unrelated stuff: * app/paint/gimpairbrush.c: added a #warning FIXME. * app/tools/gimpdrawtool.c: made a warning more verbose. * app/tools/gimppainttool.c: put one more drawable offset calculation in { .. }, will make a utility function out of it...
44 lines
2.1 KiB
C
44 lines
2.1 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__
|
|
|
|
|
|
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);
|
|
void gimp_display_shell_scale_fit (GimpDisplayShell *gdisp);
|
|
void gimp_display_shell_scale_by_values (GimpDisplayShell *gdisp,
|
|
gint 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);
|
|
|
|
|
|
#endif /* __GIMP_DISPLAY_SHELL_SCALE_H__ */
|