New function to replace any occurance of

2008-07-11  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_get_scaled_image_viewport_offset): New
	function to replace any occurance of

	  shell->disp_[xy]offset - shell->offset_[xy]

	that is just an implementation specific way of saying the same
	thing.

	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-transform.c: Make the code less
	implementation dependant by using the new function.

svn path=/trunk/; revision=26137
This commit is contained in:
Martin Nordholts
2008-07-11 19:31:45 +00:00
committed by Martin Nordholts
parent 78ef0cd13f
commit 18c89550fa
5 changed files with 109 additions and 32 deletions

View File

@ -20,23 +20,27 @@
#define __GIMP_DISPLAY_SHELL_SCROLL_H__
void gimp_display_shell_scroll (GimpDisplayShell *shell,
gdouble x_offset_into_image,
gdouble y_offset_into_image);
void gimp_display_shell_scroll (GimpDisplayShell *shell,
gdouble x_offset_into_image,
gdouble y_offset_into_image);
void gimp_display_shell_scroll_clamp_offsets (GimpDisplayShell *shell);
void gimp_display_shell_scroll_clamp_offsets (GimpDisplayShell *shell);
void gimp_display_shell_get_scaled_viewport (GimpDisplayShell *shell,
gint *x,
gint *y,
gint *w,
gint *h);
void gimp_display_shell_get_scaled_viewport (GimpDisplayShell *shell,
gint *x,
gint *y,
gint *w,
gint *h);
void gimp_display_shell_get_viewport (GimpDisplayShell *shell,
gdouble *x,
gdouble *y,
gdouble *w,
gdouble *h);
void gimp_display_shell_get_viewport (GimpDisplayShell *shell,
gdouble *x,
gdouble *y,
gdouble *w,
gdouble *h);
void gimp_display_shell_get_scaled_image_viewport_offset (GimpDisplayShell *shell,
gint *x,
gint *y);
#endif /* __GIMP_DISPLAY_SHELL_SCROLL_H__ */