gimp r26476 - in trunk: . app/display
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26476 - in trunk: . app/display
- Date: Sun, 10 Aug 2008 09:08:11 +0000 (UTC)
Author: martinn
Date: Sun Aug 10 09:08:11 2008
New Revision: 26476
URL: http://svn.gnome.org/viewvc/gimp?rev=26476&view=rev
Log:
2008-08-10 Martin Nordholts <martinn svn gnome org>
* app/display/gimpdisplayshell-scroll.[ch]: gimp_display_shell_ ->
gimp_display_shell_scroll_ for functions that are scroll
related. Also did some other minor renamings.
* app/display/gimpnavigationeditor.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-render.c
* app/display/gimpdisplayshell-transform.c
* app/display/gimpdisplayshell-callbacks.c: Adapt to the name
changes.
Modified:
trunk/ChangeLog
trunk/app/display/gimpdisplayshell-callbacks.c
trunk/app/display/gimpdisplayshell-draw.c
trunk/app/display/gimpdisplayshell-render.c
trunk/app/display/gimpdisplayshell-scale.c
trunk/app/display/gimpdisplayshell-scroll.c
trunk/app/display/gimpdisplayshell-scroll.h
trunk/app/display/gimpdisplayshell-transform.c
trunk/app/display/gimpnavigationeditor.c
Modified: trunk/app/display/gimpdisplayshell-callbacks.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-callbacks.c (original)
+++ trunk/app/display/gimpdisplayshell-callbacks.c Sun Aug 10 09:08:11 2008
@@ -1695,7 +1695,7 @@
(scroll == GTK_SCROLL_PAGE_FORWARD))
return FALSE;
- gimp_display_shell_setup_hscrollbar_with_value (shell, value);
+ gimp_display_shell_scroll_setup_hscrollbar (shell, value);
gtk_adjustment_changed (shell->hsbdata);
@@ -1716,7 +1716,7 @@
(scroll == GTK_SCROLL_PAGE_FORWARD))
return FALSE;
- gimp_display_shell_setup_vscrollbar_with_value (shell, value);
+ gimp_display_shell_scroll_setup_vscrollbar (shell, value);
gtk_adjustment_changed (shell->vsbdata);
Modified: trunk/app/display/gimpdisplayshell-draw.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-draw.c (original)
+++ trunk/app/display/gimpdisplayshell-draw.c Sun Aug 10 09:08:11 2008
@@ -510,7 +510,7 @@
if (! shell->display->image)
return;
- gimp_display_shell_get_scaled_viewport_offset (shell, &sx, &sy);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell, &sx, &sy);
gimp_display_shell_get_scaled_image_size (shell, &sw, &sh);
/* check if the passed in area intersects with
@@ -552,9 +552,9 @@
dx = MIN (x2 - j, GIMP_DISPLAY_RENDER_BUF_WIDTH);
dy = MIN (y2 - i, GIMP_DISPLAY_RENDER_BUF_HEIGHT);
- gimp_display_shell_get_disp_offset (shell,
- &disp_xoffset,
- &disp_yoffset);
+ gimp_display_shell_scroll_get_disp_offset (shell,
+ &disp_xoffset,
+ &disp_yoffset);
gimp_display_shell_render (shell,
j - disp_xoffset,
Modified: trunk/app/display/gimpdisplayshell-render.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-render.c (original)
+++ trunk/app/display/gimpdisplayshell-render.c Sun Aug 10 09:08:11 2008
@@ -234,7 +234,7 @@
projection = gimp_image_get_projection (image);
- gimp_display_shell_get_render_start_offset (shell, &offset_x, &offset_y);
+ gimp_display_shell_scroll_get_render_start_offset (shell, &offset_x, &offset_y);
/* Initialize RenderInfo with values that don't change during the
* call of this function.
@@ -320,8 +320,8 @@
gint disp_xoffset, disp_yoffset;
gint offset_x, offset_y;
- gimp_display_shell_get_disp_offset (shell, &disp_xoffset, &disp_yoffset);
- gimp_display_shell_get_render_start_offset (shell, &offset_x, &offset_y);
+ gimp_display_shell_scroll_get_disp_offset (shell, &disp_xoffset, &disp_yoffset);
+ gimp_display_shell_scroll_get_render_start_offset (shell, &offset_x, &offset_y);
gimp_canvas_draw_rgb (GIMP_CANVAS (shell->canvas), GIMP_CANVAS_STYLE_RENDER,
x + disp_xoffset, y + disp_yoffset,
@@ -355,7 +355,7 @@
gint offset_x;
gint offset_y;
- gimp_display_shell_get_render_start_offset (shell, &offset_x, &offset_y);
+ gimp_display_shell_scroll_get_render_start_offset (shell, &offset_x, &offset_y);
rect.x = x + offset_x;
rect.y = y + offset_y;
Modified: trunk/app/display/gimpdisplayshell-scale.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-scale.c (original)
+++ trunk/app/display/gimpdisplayshell-scale.c Sun Aug 10 09:08:11 2008
@@ -125,7 +125,7 @@
shell->hsbdata->page_size = shell->disp_width;
shell->hsbdata->page_increment = shell->disp_width / 2;
- gimp_display_shell_setup_hscrollbar_with_value (shell, shell->offset_x);
+ gimp_display_shell_scroll_setup_hscrollbar (shell, shell->offset_x);
gtk_adjustment_changed (shell->hsbdata);
@@ -136,7 +136,7 @@
shell->vsbdata->page_size = shell->disp_height;
shell->vsbdata->page_increment = shell->disp_height / 2;
- gimp_display_shell_setup_vscrollbar_with_value (shell, shell->offset_y);
+ gimp_display_shell_scroll_setup_vscrollbar (shell, shell->offset_y);
gtk_adjustment_changed (shell->vsbdata);
@@ -182,9 +182,9 @@
/* Adjust due to scrolling */
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
horizontal_lower -= img2real (shell, TRUE,
FUNSCALEX (shell,
Modified: trunk/app/display/gimpdisplayshell-scroll.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-scroll.c (original)
+++ trunk/app/display/gimpdisplayshell-scroll.c Sun Aug 10 09:08:11 2008
@@ -45,7 +45,7 @@
/**
- * gimp_display_shell_center_around_image_coordinate:
+ * gimp_display_shell_scroll_center_image_coordinate:
* @shell:
* @image_x:
* @image_y:
@@ -54,7 +54,7 @@
*
**/
void
-gimp_display_shell_center_around_image_coordinate (GimpDisplayShell *shell,
+gimp_display_shell_scroll_center_image_coordinate (GimpDisplayShell *shell,
gdouble image_x,
gdouble image_y)
{
@@ -281,7 +281,7 @@
}
/**
- * gimp_display_shell_get_scaled_viewport:
+ * gimp_display_shell_scroll_get_scaled_viewport:
* @shell:
* @x:
* @y:
@@ -293,20 +293,20 @@
*
**/
void
-gimp_display_shell_get_scaled_viewport (const GimpDisplayShell *shell,
- gint *x,
- gint *y,
- gint *w,
- gint *h)
+gimp_display_shell_scroll_get_scaled_viewport (const GimpDisplayShell *shell,
+ gint *x,
+ gint *y,
+ gint *w,
+ gint *h)
{
gint scaled_viewport_offset_x;
gint scaled_viewport_offset_y;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
if (x) *x = -scaled_viewport_offset_x;
if (y) *y = -scaled_viewport_offset_y;
if (w) *w = shell->disp_width;
@@ -314,7 +314,7 @@
}
/**
- * gimp_display_shell_get_viewport:
+ * gimp_display_shell_scroll_get_viewport:
* @shell:
* @x:
* @y:
@@ -325,11 +325,11 @@
*
**/
void
-gimp_display_shell_get_viewport (const GimpDisplayShell *shell,
- gdouble *x,
- gdouble *y,
- gdouble *w,
- gdouble *h)
+gimp_display_shell_scroll_get_viewport (const GimpDisplayShell *shell,
+ gdouble *x,
+ gdouble *y,
+ gdouble *w,
+ gdouble *h)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@@ -340,7 +340,7 @@
}
/**
- * gimp_display_shell_get_scaled_viewport_offset:
+ * gimp_display_shell_scroll_get_scaled_viewport_offset:
* @shell:
* @x:
* @y:
@@ -349,9 +349,9 @@
*
**/
void
-gimp_display_shell_get_scaled_viewport_offset (const GimpDisplayShell *shell,
- gint *x,
- gint *y)
+gimp_display_shell_scroll_get_scaled_viewport_offset (const GimpDisplayShell *shell,
+ gint *x,
+ gint *y)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@@ -396,7 +396,7 @@
}
/**
- * gimp_display_shell_get_disp_offset:
+ * gimp_display_shell_scroll_get_disp_offset:
* @shell:
* @disp_xoffset:
* @disp_yoffset:
@@ -406,9 +406,9 @@
*
**/
void
-gimp_display_shell_get_disp_offset (const GimpDisplayShell *shell,
- gint *disp_xoffset,
- gint *disp_yoffset)
+gimp_display_shell_scroll_get_disp_offset (const GimpDisplayShell *shell,
+ gint *disp_xoffset,
+ gint *disp_yoffset)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@@ -438,7 +438,7 @@
}
/**
- * gimp_display_shell_get_render_start_offset:
+ * gimp_display_shell_scroll_get_render_start_offset:
* @shell:
* @offset_x:
* @offset_y:
@@ -448,9 +448,9 @@
*
**/
void
-gimp_display_shell_get_render_start_offset (const GimpDisplayShell *shell,
- gint *offset_x,
- gint *offset_y)
+gimp_display_shell_scroll_get_render_start_offset (const GimpDisplayShell *shell,
+ gint *offset_x,
+ gint *offset_y)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@@ -459,7 +459,7 @@
}
/**
- * gimp_display_shell_setup_hscrollbar_with_value:
+ * gimp_display_shell_scroll_setup_hscrollbar:
* @shell:
* @value:
*
@@ -467,8 +467,8 @@
*
**/
void
-gimp_display_shell_setup_hscrollbar_with_value (GimpDisplayShell *shell,
- gdouble value)
+gimp_display_shell_scroll_setup_hscrollbar (GimpDisplayShell *shell,
+ gdouble value)
{
gint sw;
@@ -501,7 +501,7 @@
}
/**
- * gimp_display_shell_setup_vscrollbar_with_value:
+ * gimp_display_shell_scroll_setup_vscrollbar:
* @shell:
* @value:
*
@@ -509,8 +509,8 @@
*
**/
void
-gimp_display_shell_setup_vscrollbar_with_value (GimpDisplayShell *shell,
- gdouble value)
+gimp_display_shell_scroll_setup_vscrollbar (GimpDisplayShell *shell,
+ gdouble value)
{
gint sh;
Modified: trunk/app/display/gimpdisplayshell-scroll.h
==============================================================================
--- trunk/app/display/gimpdisplayshell-scroll.h (original)
+++ trunk/app/display/gimpdisplayshell-scroll.h Sun Aug 10 09:08:11 2008
@@ -20,51 +20,51 @@
#define __GIMP_DISPLAY_SHELL_SCROLL_H__
-void gimp_display_shell_center_around_image_coordinate (GimpDisplayShell *shell,
- gdouble image_x,
- gdouble image_y);
-
-void gimp_display_shell_scroll_clamp_offsets (GimpDisplayShell *shell);
-
-void gimp_display_shell_scroll_center_image (GimpDisplayShell *shell,
- gboolean horizontally,
- gboolean vertically);
+void gimp_display_shell_scroll_center_image_coordinate (GimpDisplayShell *shell,
+ gdouble image_x,
+ gdouble image_y);
+
+void gimp_display_shell_scroll_clamp_offsets (GimpDisplayShell *shell);
+
+void gimp_display_shell_scroll_center_image (GimpDisplayShell *shell,
+ gboolean horizontally,
+ gboolean vertically);
void gimp_display_shell_scroll_center_image_on_next_size_allocate
- (GimpDisplayShell *shell);
+ (GimpDisplayShell *shell);
-void gimp_display_shell_get_scaled_viewport (const GimpDisplayShell *shell,
- gint *x,
- gint *y,
- gint *w,
- gint *h);
-
-void gimp_display_shell_get_viewport (const GimpDisplayShell *shell,
- gdouble *x,
- gdouble *y,
- gdouble *w,
- gdouble *h);
-
-void gimp_display_shell_get_scaled_viewport_offset (const GimpDisplayShell *shell,
- gint *x,
- gint *y);
-
-void gimp_display_shell_get_scaled_image_size (const GimpDisplayShell *shell,
- gint *w,
- gint *h);
-
-void gimp_display_shell_get_disp_offset (const GimpDisplayShell *shell,
- gint *disp_xoffset,
- gint *disp_yoffset);
-
-void gimp_display_shell_get_render_start_offset (const GimpDisplayShell *shell,
- gint *offset_x,
- gint *offset_y);
-
-void gimp_display_shell_setup_hscrollbar_with_value (GimpDisplayShell *shell,
- gdouble value);
-void gimp_display_shell_setup_vscrollbar_with_value (GimpDisplayShell *shell,
- gdouble value);
+void gimp_display_shell_scroll_get_scaled_viewport (const GimpDisplayShell *shell,
+ gint *x,
+ gint *y,
+ gint *w,
+ gint *h);
+
+void gimp_display_shell_scroll_get_viewport (const GimpDisplayShell *shell,
+ gdouble *x,
+ gdouble *y,
+ gdouble *w,
+ gdouble *h);
+
+void gimp_display_shell_scroll_get_scaled_viewport_offset (const GimpDisplayShell *shell,
+ gint *x,
+ gint *y);
+
+void gimp_display_shell_get_scaled_image_size (const GimpDisplayShell *shell,
+ gint *w,
+ gint *h);
+
+void gimp_display_shell_scroll_get_disp_offset (const GimpDisplayShell *shell,
+ gint *disp_xoffset,
+ gint *disp_yoffset);
+
+void gimp_display_shell_scroll_get_render_start_offset (const GimpDisplayShell *shell,
+ gint *offset_x,
+ gint *offset_y);
+
+void gimp_display_shell_scroll_setup_hscrollbar (GimpDisplayShell *shell,
+ gdouble value);
+void gimp_display_shell_scroll_setup_vscrollbar (GimpDisplayShell *shell,
+ gdouble value);
#endif /* __GIMP_DISPLAY_SHELL_SCROLL_H__ */
Modified: trunk/app/display/gimpdisplayshell-transform.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-transform.c (original)
+++ trunk/app/display/gimpdisplayshell-transform.c Sun Aug 10 09:08:11 2008
@@ -61,9 +61,9 @@
display_coords->x = SCALEX (shell, image_coords->x);
display_coords->y = SCALEY (shell, image_coords->y);
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
display_coords->x += scaled_viewport_offset_x;
display_coords->y += scaled_viewport_offset_y;
@@ -92,9 +92,9 @@
*image_coords = *display_coords;
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
image_coords->x = display_coords->x - scaled_viewport_offset_x;
image_coords->y = display_coords->y - scaled_viewport_offset_y;
@@ -136,9 +136,9 @@
tx = ((gint64) x * shell->x_src_dec) / shell->x_dest_inc;
ty = ((gint64) y * shell->y_src_dec) / shell->y_dest_inc;
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
tx += scaled_viewport_offset_x;
ty += scaled_viewport_offset_y;
@@ -192,9 +192,9 @@
gimp_item_offsets (item, &offset_x, &offset_y);
}
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
tx = (gint64) x - scaled_viewport_offset_x;
ty = (gint64) y - scaled_viewport_offset_y;
@@ -249,9 +249,9 @@
gimp_item_offsets (item, &offset_x, &offset_y);
}
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
*nx = SCALEX (shell, x + offset_x) + scaled_viewport_offset_x;
*ny = SCALEY (shell, y + offset_y) + scaled_viewport_offset_y;
@@ -296,9 +296,9 @@
gimp_item_offsets (item, &offset_x, &offset_y);
}
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
*nx = (x - scaled_viewport_offset_x) / shell->scale_x - offset_x;
*ny = (y - scaled_viewport_offset_y) / shell->scale_y - offset_y;
@@ -347,9 +347,9 @@
x = x * shell->x_src_dec / shell->x_dest_inc;
y = y * shell->y_src_dec / shell->y_dest_inc;
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
coords[i].x = CLAMP (PROJ_ROUND64 (x) + scaled_viewport_offset_x,
G_MININT, G_MAXINT);
@@ -401,9 +401,9 @@
x = x * shell->x_src_dec / shell->x_dest_inc;
y = y * shell->y_src_dec / shell->y_dest_inc;
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
disp_coords[i].x = CLAMP (PROJ_ROUND64 (x) + scaled_viewport_offset_x,
G_MININT, G_MAXINT);
@@ -462,9 +462,9 @@
y1 = (y1 * shell->y_src_dec) / shell->y_dest_inc;
y2 = (y2 * shell->y_src_dec) / shell->y_dest_inc;
- gimp_display_shell_get_scaled_viewport_offset (shell,
- &scaled_viewport_offset_x,
- &scaled_viewport_offset_y);
+ gimp_display_shell_scroll_get_scaled_viewport_offset (shell,
+ &scaled_viewport_offset_x,
+ &scaled_viewport_offset_y);
dest_segs[i].x1 = CLAMP (x1 + scaled_viewport_offset_x,
G_MININT, G_MAXINT);
Modified: trunk/app/display/gimpnavigationeditor.c
==============================================================================
--- trunk/app/display/gimpnavigationeditor.c (original)
+++ trunk/app/display/gimpnavigationeditor.c Sun Aug 10 09:08:11 2008
@@ -510,7 +510,7 @@
{
GimpDisplayShell *shell = editor->shell;
- gimp_display_shell_center_around_image_coordinate (shell,
+ gimp_display_shell_scroll_center_image_coordinate (shell,
x + width / 2,
y + height / 2);
}
@@ -660,7 +660,7 @@
gdouble x, y;
gdouble w, h;
- gimp_display_shell_get_viewport (shell, &x, &y, &w, &h);
+ gimp_display_shell_scroll_get_viewport (shell, &x, &y, &w, &h);
gimp_navigation_view_set_marker (view, x, y, w, h);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]