app/display/gimpdisplayshell-draw.[ch]

2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-draw.[ch]
	* app/display/gimpdisplayshell-render.[ch]
	* app/display/gimpdisplayshell-transform.[ch]
	* app/display/gimpdisplayshell-appearance.[ch]: Sprinkle as many
	const qualifiers we can without any implementation changes.

svn path=/trunk/; revision=26477
This commit is contained in:
Martin Nordholts
2008-08-10 10:09:03 +00:00
committed by Martin Nordholts
parent b9f66d0489
commit 7865481ddf
9 changed files with 295 additions and 287 deletions

View File

@ -1,3 +1,11 @@
2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-draw.[ch]
* app/display/gimpdisplayshell-render.[ch]
* app/display/gimpdisplayshell-transform.[ch]
* app/display/gimpdisplayshell-appearance.[ch]: Sprinkle as many
const qualifiers we can without any implementation changes.
2008-08-10 Martin Nordholts <martinn@svn.gnome.org> 2008-08-10 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-scroll.[ch]: gimp_display_shell_ -> * app/display/gimpdisplayshell-scroll.[ch]: gimp_display_shell_ ->
@ -6,7 +14,7 @@
* app/display/gimpnavigationeditor.c * app/display/gimpnavigationeditor.c
* app/display/gimpdisplayshell-draw.c * app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-scale.c * app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-render.c * app/display/gimpdisplayshell-render.c
* app/display/gimpdisplayshell-transform.c * app/display/gimpdisplayshell-transform.c
* app/display/gimpdisplayshell-callbacks.c: Adapt to the name * app/display/gimpdisplayshell-callbacks.c: Adapt to the name

View File

@ -126,7 +126,7 @@ gimp_display_shell_set_fullscreen (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_fullscreen (GimpDisplayShell *shell) gimp_display_shell_get_fullscreen (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -160,7 +160,7 @@ gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_menubar (GimpDisplayShell *shell) gimp_display_shell_get_show_menubar (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -208,7 +208,7 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_rulers (GimpDisplayShell *shell) gimp_display_shell_get_show_rulers (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -266,7 +266,7 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell) gimp_display_shell_get_show_scrollbars (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -294,7 +294,7 @@ gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_statusbar (GimpDisplayShell *shell) gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -322,7 +322,7 @@ gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_selection (GimpDisplayShell *shell) gimp_display_shell_get_show_selection (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -350,7 +350,7 @@ gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_layer (GimpDisplayShell *shell) gimp_display_shell_get_show_layer (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -367,7 +367,7 @@ gimp_display_shell_set_show_transform (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_transform (GimpDisplayShell *shell) gimp_display_shell_get_show_transform (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -399,7 +399,7 @@ gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_guides (GimpDisplayShell *shell) gimp_display_shell_get_show_guides (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -431,7 +431,7 @@ gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_grid (GimpDisplayShell *shell) gimp_display_shell_get_show_grid (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -463,7 +463,7 @@ gimp_display_shell_set_show_sample_points (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_show_sample_points (GimpDisplayShell *shell) gimp_display_shell_get_show_sample_points (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -488,7 +488,7 @@ gimp_display_shell_set_snap_to_grid (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_snap_to_grid (GimpDisplayShell *shell) gimp_display_shell_get_snap_to_grid (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -513,7 +513,7 @@ gimp_display_shell_set_snap_to_guides (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_snap_to_guides (GimpDisplayShell *shell) gimp_display_shell_get_snap_to_guides (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -538,7 +538,7 @@ gimp_display_shell_set_snap_to_canvas (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_snap_to_canvas (GimpDisplayShell *shell) gimp_display_shell_get_snap_to_canvas (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -563,7 +563,7 @@ gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell,
} }
gboolean gboolean
gimp_display_shell_get_snap_to_vectors (GimpDisplayShell *shell) gimp_display_shell_get_snap_to_vectors (const GimpDisplayShell *shell)
{ {
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE); g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -630,9 +630,9 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
} }
void void
gimp_display_shell_get_padding (GimpDisplayShell *shell, gimp_display_shell_get_padding (const GimpDisplayShell *shell,
GimpCanvasPaddingMode *padding_mode, GimpCanvasPaddingMode *padding_mode,
GimpRGB *padding_color) GimpRGB *padding_color)
{ {
GimpDisplayOptions *options; GimpDisplayOptions *options;

View File

@ -20,74 +20,74 @@
#define __GIMP_DISPLAY_SHELL_APPEARANCE_H__ #define __GIMP_DISPLAY_SHELL_APPEARANCE_H__
void gimp_display_shell_appearance_update (GimpDisplayShell *shell); void gimp_display_shell_appearance_update (GimpDisplayShell *shell);
void gimp_display_shell_set_fullscreen (GimpDisplayShell *shell, void gimp_display_shell_set_fullscreen (GimpDisplayShell *shell,
gboolean fullscreen); gboolean fullscreen);
gboolean gimp_display_shell_get_fullscreen (GimpDisplayShell *shell); gboolean gimp_display_shell_get_fullscreen (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_menubar (GimpDisplayShell *shell, void gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_menubar (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_menubar (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_rulers (GimpDisplayShell *shell, void gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_rulers (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_rulers (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell, void gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_scrollbars (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell, void gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_statusbar (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_selection (GimpDisplayShell *shell, void gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_selection (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_selection (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_layer (GimpDisplayShell *shell, void gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_layer (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_layer (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_transform (GimpDisplayShell *shell, void gimp_display_shell_set_show_transform (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_transform (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_transform (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_grid (GimpDisplayShell *shell, void gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_grid (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_grid (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_guides (GimpDisplayShell *shell, void gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_guides (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_guides (const GimpDisplayShell *shell);
void gimp_display_shell_set_snap_to_grid (GimpDisplayShell *shell, void gimp_display_shell_set_snap_to_grid (GimpDisplayShell *shell,
gboolean snap); gboolean snap);
gboolean gimp_display_shell_get_snap_to_grid (GimpDisplayShell *shell); gboolean gimp_display_shell_get_snap_to_grid (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_sample_points (GimpDisplayShell *shell, void gimp_display_shell_set_show_sample_points (GimpDisplayShell *shell,
gboolean show); gboolean show);
gboolean gimp_display_shell_get_show_sample_points (GimpDisplayShell *shell); gboolean gimp_display_shell_get_show_sample_points (const GimpDisplayShell *shell);
void gimp_display_shell_set_snap_to_guides (GimpDisplayShell *shell, void gimp_display_shell_set_snap_to_guides (GimpDisplayShell *shell,
gboolean snap); gboolean snap);
gboolean gimp_display_shell_get_snap_to_guides (GimpDisplayShell *shell); gboolean gimp_display_shell_get_snap_to_guides (const GimpDisplayShell *shell);
void gimp_display_shell_set_snap_to_canvas (GimpDisplayShell *shell, void gimp_display_shell_set_snap_to_canvas (GimpDisplayShell *shell,
gboolean snap); gboolean snap);
gboolean gimp_display_shell_get_snap_to_canvas (GimpDisplayShell *shell); gboolean gimp_display_shell_get_snap_to_canvas (const GimpDisplayShell *shell);
void gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell, void gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell,
gboolean snap); gboolean snap);
gboolean gimp_display_shell_get_snap_to_vectors (GimpDisplayShell *shell); gboolean gimp_display_shell_get_snap_to_vectors (const GimpDisplayShell *shell);
void gimp_display_shell_set_padding (GimpDisplayShell *shell, void gimp_display_shell_set_padding (GimpDisplayShell *shell,
GimpCanvasPaddingMode mode, GimpCanvasPaddingMode mode,
const GimpRGB *color); const GimpRGB *color);
void gimp_display_shell_get_padding (GimpDisplayShell *shell, void gimp_display_shell_get_padding (const GimpDisplayShell *shell,
GimpCanvasPaddingMode *mode, GimpCanvasPaddingMode *mode,
GimpRGB *color); GimpRGB *color);
#endif /* __GIMP_DISPLAY_SHELL_APPEARANCE_H__ */ #endif /* __GIMP_DISPLAY_SHELL_APPEARANCE_H__ */

View File

@ -64,9 +64,9 @@ static GdkGC * gimp_display_shell_get_pen_gc (GimpDisplayShell *shell,
/* public functions */ /* public functions */
void void
gimp_display_shell_draw_guide (GimpDisplayShell *shell, gimp_display_shell_draw_guide (const GimpDisplayShell *shell,
GimpGuide *guide, GimpGuide *guide,
gboolean active) gboolean active)
{ {
gint position; gint position;
gint x1, y1, x2, y2; gint x1, y1, x2, y2;
@ -108,7 +108,7 @@ gimp_display_shell_draw_guide (GimpDisplayShell *shell,
} }
void void
gimp_display_shell_draw_guides (GimpDisplayShell *shell) gimp_display_shell_draw_guides (const GimpDisplayShell *shell)
{ {
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell)); g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -340,9 +340,9 @@ gimp_display_shell_draw_pen (GimpDisplayShell *shell,
} }
void void
gimp_display_shell_draw_sample_point (GimpDisplayShell *shell, gimp_display_shell_draw_sample_point (const GimpDisplayShell *shell,
GimpSamplePoint *sample_point, GimpSamplePoint *sample_point,
gboolean active) gboolean active)
{ {
GimpCanvasStyle style; GimpCanvasStyle style;
gdouble x, y; gdouble x, y;
@ -406,7 +406,7 @@ gimp_display_shell_draw_sample_point (GimpDisplayShell *shell,
} }
void void
gimp_display_shell_draw_sample_points (GimpDisplayShell *shell) gimp_display_shell_draw_sample_points (const GimpDisplayShell *shell)
{ {
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell)); g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -425,8 +425,8 @@ gimp_display_shell_draw_sample_points (GimpDisplayShell *shell)
} }
void void
gimp_display_shell_draw_vector (GimpDisplayShell *shell, gimp_display_shell_draw_vector (const GimpDisplayShell *shell,
GimpVectors *vectors) GimpVectors *vectors)
{ {
GimpStroke *stroke = NULL; GimpStroke *stroke = NULL;
@ -464,7 +464,7 @@ gimp_display_shell_draw_vector (GimpDisplayShell *shell,
} }
void void
gimp_display_shell_draw_vectors (GimpDisplayShell *shell) gimp_display_shell_draw_vectors (const GimpDisplayShell *shell)
{ {
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell)); g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -486,7 +486,7 @@ gimp_display_shell_draw_vectors (GimpDisplayShell *shell)
} }
void void
gimp_display_shell_draw_cursor (GimpDisplayShell *shell) gimp_display_shell_draw_cursor (const GimpDisplayShell *shell)
{ {
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell)); g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -496,11 +496,11 @@ gimp_display_shell_draw_cursor (GimpDisplayShell *shell)
} }
void void
gimp_display_shell_draw_area (GimpDisplayShell *shell, gimp_display_shell_draw_area (const GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint w, gint w,
gint h) gint h)
{ {
gint sx, sy; gint sx, sy;
gint sw, sh; gint sw, sh;

View File

@ -20,31 +20,31 @@
#define __GIMP_DISPLAY_SHELL_DRAW_H__ #define __GIMP_DISPLAY_SHELL_DRAW_H__
void gimp_display_shell_draw_guide (GimpDisplayShell *shell, void gimp_display_shell_draw_guide (const GimpDisplayShell *shell,
GimpGuide *guide, GimpGuide *guide,
gboolean active); gboolean active);
void gimp_display_shell_draw_guides (GimpDisplayShell *shell); void gimp_display_shell_draw_guides (const GimpDisplayShell *shell);
void gimp_display_shell_draw_grid (GimpDisplayShell *shell, void gimp_display_shell_draw_grid (GimpDisplayShell *shell,
const GdkRectangle *area); const GdkRectangle *area);
void gimp_display_shell_draw_pen (GimpDisplayShell *shell, void gimp_display_shell_draw_pen (GimpDisplayShell *shell,
const GimpVector2 *points, const GimpVector2 *points,
gint num_points, gint num_points,
GimpContext *context, GimpContext *context,
GimpActiveColor color, GimpActiveColor color,
gint width); gint width);
void gimp_display_shell_draw_sample_point (GimpDisplayShell *shell, void gimp_display_shell_draw_sample_point (const GimpDisplayShell *shell,
GimpSamplePoint *sample_point, GimpSamplePoint *sample_point,
gboolean active); gboolean active);
void gimp_display_shell_draw_sample_points (GimpDisplayShell *shell); void gimp_display_shell_draw_sample_points (const GimpDisplayShell *shell);
void gimp_display_shell_draw_vector (GimpDisplayShell *shell, void gimp_display_shell_draw_vector (const GimpDisplayShell *shell,
GimpVectors *vectors); GimpVectors *vectors);
void gimp_display_shell_draw_vectors (GimpDisplayShell *shell); void gimp_display_shell_draw_vectors (const GimpDisplayShell *shell);
void gimp_display_shell_draw_cursor (GimpDisplayShell *shell); void gimp_display_shell_draw_cursor (const GimpDisplayShell *shell);
void gimp_display_shell_draw_area (GimpDisplayShell *shell, void gimp_display_shell_draw_area (const GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint w, gint w,
gint h); gint h);
#endif /* __GIMP_DISPLAY_SHELL_DRAW_H__ */ #endif /* __GIMP_DISPLAY_SHELL_DRAW_H__ */

View File

@ -64,49 +64,49 @@ typedef void (* RenderFunc) (RenderInfo *info);
struct _RenderInfo struct _RenderInfo
{ {
GimpDisplayShell *shell; const GimpDisplayShell *shell;
TileManager *src_tiles; TileManager *src_tiles;
const guchar *src; const guchar *src;
guchar *dest; guchar *dest;
gboolean src_is_premult; gboolean src_is_premult;
gint x, y; gint x, y;
gint w, h; gint w, h;
gdouble scalex; gdouble scalex;
gdouble scaley; gdouble scaley;
gint src_x; gint src_x;
gint src_y; gint src_y;
gint dest_bpp; gint dest_bpp;
gint dest_bpl; gint dest_bpl;
gint dest_width; gint dest_width;
gint zoom_quality; gint zoom_quality;
/* Bresenham helpers */ /* Bresenham helpers */
gint x_dest_inc; /* amount to increment for each dest. pixel */ gint x_dest_inc; /* amount to increment for each dest. pixel */
gint x_src_dec; /* amount to decrement for each source pixel */ gint x_src_dec; /* amount to decrement for each source pixel */
gint64 dx_start; /* pixel fraction for first pixel */ gint64 dx_start; /* pixel fraction for first pixel */
gint y_dest_inc; gint y_dest_inc;
gint y_src_dec; gint y_src_dec;
gint64 dy_start; gint64 dy_start;
gint footprint_x; gint footprint_x;
gint footprint_y; gint footprint_y;
gint footshift_x; gint footshift_x;
gint footshift_y; gint footshift_y;
gint64 dy; gint64 dy;
}; };
static void gimp_display_shell_render_info_scale (RenderInfo *info, static void gimp_display_shell_render_info_scale (RenderInfo *info,
GimpDisplayShell *shell, const GimpDisplayShell *shell,
TileManager *tiles, TileManager *tiles,
gint level, gint level,
gboolean is_premult); gboolean is_premult);
static void gimp_display_shell_render_setup_notify (GObject *config, static void gimp_display_shell_render_setup_notify (GObject *config,
GParamSpec *param_spec, GParamSpec *param_spec,
Gimp *gimp); Gimp *gimp);
static guchar *tile_buf = NULL; static guchar *tile_buf = NULL;
@ -189,20 +189,20 @@ gimp_display_shell_render_setup_notify (GObject *config,
/* Render Image functions */ /* Render Image functions */
static void render_image_rgb_a (RenderInfo *info); static void render_image_rgb_a (RenderInfo *info);
static void render_image_gray_a (RenderInfo *info); static void render_image_gray_a (RenderInfo *info);
static const guchar * render_image_tile_fault (RenderInfo *info); static const guchar * render_image_tile_fault (RenderInfo *info);
static void gimp_display_shell_render_highlight (GimpDisplayShell *shell, static void gimp_display_shell_render_highlight (const GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint w, gint w,
gint h, gint h,
GdkRectangle *highlight); GdkRectangle *highlight);
static void gimp_display_shell_render_mask (GimpDisplayShell *shell, static void gimp_display_shell_render_mask (const GimpDisplayShell *shell,
RenderInfo *info); RenderInfo *info);
/*****************************************************************/ /*****************************************************************/
@ -213,12 +213,12 @@ static void gimp_display_shell_render_mask (GimpDisplayShell *shell,
/*****************************************************************/ /*****************************************************************/
void void
gimp_display_shell_render (GimpDisplayShell *shell, gimp_display_shell_render (const GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint w, gint w,
gint h, gint h,
GdkRectangle *highlight) GdkRectangle *highlight)
{ {
GimpProjection *projection; GimpProjection *projection;
GimpImage *image; GimpImage *image;
@ -343,12 +343,12 @@ gimp_display_shell_render (GimpDisplayShell *shell,
/* This function highlights the given area by dimming all pixels outside. */ /* This function highlights the given area by dimming all pixels outside. */
static void static void
gimp_display_shell_render_highlight (GimpDisplayShell *shell, gimp_display_shell_render_highlight (const GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint w, gint w,
gint h, gint h,
GdkRectangle *highlight) GdkRectangle *highlight)
{ {
guchar *buf = shell->render_buf; guchar *buf = shell->render_buf;
GdkRectangle rect; GdkRectangle rect;
@ -407,8 +407,8 @@ gimp_display_shell_render_highlight (GimpDisplayShell *shell,
} }
static void static void
gimp_display_shell_render_mask (GimpDisplayShell *shell, gimp_display_shell_render_mask (const GimpDisplayShell *shell,
RenderInfo *info) RenderInfo *info)
{ {
gint y, ye; gint y, ye;
gint x, xe; gint x, xe;
@ -592,11 +592,11 @@ render_image_rgb_a (RenderInfo *info)
} }
static void static void
gimp_display_shell_render_info_scale (RenderInfo *info, gimp_display_shell_render_info_scale (RenderInfo *info,
GimpDisplayShell *shell, const GimpDisplayShell *shell,
TileManager *tiles, TileManager *tiles,
gint level, gint level,
gboolean is_premult) gboolean is_premult)
{ {
info->src_tiles = tiles; info->src_tiles = tiles;
info->src_is_premult = is_premult; info->src_is_premult = is_premult;

View File

@ -20,15 +20,15 @@
#define __GIMP_DISPLAY_SHELL_RENDER_H__ #define __GIMP_DISPLAY_SHELL_RENDER_H__
void gimp_display_shell_render_init (Gimp *gimp); void gimp_display_shell_render_init (Gimp *gimp);
void gimp_display_shell_render_exit (Gimp *gimp); void gimp_display_shell_render_exit (Gimp *gimp);
void gimp_display_shell_render (GimpDisplayShell *shell, void gimp_display_shell_render (const GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint w, gint w,
gint h, gint h,
GdkRectangle *highlight); GdkRectangle *highlight);
#endif /* __GIMP_DISPLAY_SHELL_RENDER_H__ */ #endif /* __GIMP_DISPLAY_SHELL_RENDER_H__ */

View File

@ -45,9 +45,9 @@
* objects can be rendered at the correct points on the display. * objects can be rendered at the correct points on the display.
**/ **/
void void
gimp_display_shell_transform_coordinate (GimpDisplayShell *shell, gimp_display_shell_transform_coordinate (const GimpDisplayShell *shell,
GimpCoords *image_coords, GimpCoords *image_coords,
GimpCoords *display_coords) GimpCoords *display_coords)
{ {
gint scaled_viewport_offset_x; gint scaled_viewport_offset_x;
gint scaled_viewport_offset_y; gint scaled_viewport_offset_y;
@ -79,9 +79,9 @@ gimp_display_shell_transform_coordinate (GimpDisplayShell *shell,
* points on the display can be mapped to points in the image. * points on the display can be mapped to points in the image.
**/ **/
void void
gimp_display_shell_untransform_coordinate (GimpDisplayShell *shell, gimp_display_shell_untransform_coordinate (const GimpDisplayShell *shell,
GimpCoords *display_coords, GimpCoords *display_coords,
GimpCoords *image_coords) GimpCoords *image_coords)
{ {
gint scaled_viewport_offset_x; gint scaled_viewport_offset_x;
gint scaled_viewport_offset_y; gint scaled_viewport_offset_y;
@ -104,12 +104,12 @@ gimp_display_shell_untransform_coordinate (GimpDisplayShell *shell,
} }
void void
gimp_display_shell_transform_xy (GimpDisplayShell *shell, gimp_display_shell_transform_xy (const GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gint *nx, gint *nx,
gint *ny, gint *ny,
gboolean use_offsets) gboolean use_offsets)
{ {
gint scaled_viewport_offset_x; gint scaled_viewport_offset_x;
gint scaled_viewport_offset_y; gint scaled_viewport_offset_y;
@ -165,13 +165,13 @@ gimp_display_shell_transform_xy (GimpDisplayShell *shell,
* in the image. * in the image.
**/ **/
void void
gimp_display_shell_untransform_xy (GimpDisplayShell *shell, gimp_display_shell_untransform_xy (const GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint *nx, gint *nx,
gint *ny, gint *ny,
gboolean round, gboolean round,
gboolean use_offsets) gboolean use_offsets)
{ {
gint scaled_viewport_offset_x; gint scaled_viewport_offset_x;
gint scaled_viewport_offset_y; gint scaled_viewport_offset_y;
@ -225,12 +225,12 @@ gimp_display_shell_untransform_xy (GimpDisplayShell *shell,
* except that it returns its results as doubles rather than ints. * except that it returns its results as doubles rather than ints.
**/ **/
void void
gimp_display_shell_transform_xy_f (GimpDisplayShell *shell, gimp_display_shell_transform_xy_f (const GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gdouble *nx, gdouble *nx,
gdouble *ny, gdouble *ny,
gboolean use_offsets) gboolean use_offsets)
{ {
gint scaled_viewport_offset_x; gint scaled_viewport_offset_x;
gint scaled_viewport_offset_y; gint scaled_viewport_offset_y;
@ -272,12 +272,12 @@ gimp_display_shell_transform_xy_f (GimpDisplayShell *shell,
* ints, and consequently there is no option related to rounding. * ints, and consequently there is no option related to rounding.
**/ **/
void void
gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell, gimp_display_shell_untransform_xy_f (const GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gdouble *nx, gdouble *nx,
gdouble *ny, gdouble *ny,
gboolean use_offsets) gboolean use_offsets)
{ {
gint scaled_viewport_offset_x; gint scaled_viewport_offset_x;
gint scaled_viewport_offset_y; gint scaled_viewport_offset_y;
@ -317,11 +317,11 @@ gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell,
* objects can be rendered at the correct points on the display. * objects can be rendered at the correct points on the display.
**/ **/
void void
gimp_display_shell_transform_points (GimpDisplayShell *shell, gimp_display_shell_transform_points (const GimpDisplayShell *shell,
const GimpVector2 *points, const GimpVector2 *points,
GdkPoint *coords, GdkPoint *coords,
gint n_points, gint n_points,
gboolean use_offsets) gboolean use_offsets)
{ {
gint offset_x = 0; gint offset_x = 0;
gint offset_y = 0; gint offset_y = 0;
@ -371,11 +371,11 @@ gimp_display_shell_transform_points (GimpDisplayShell *shell,
* objects can be rendered at the correct points on the display. * objects can be rendered at the correct points on the display.
**/ **/
void void
gimp_display_shell_transform_coords (GimpDisplayShell *shell, gimp_display_shell_transform_coords (const GimpDisplayShell *shell,
const GimpCoords *image_coords, const GimpCoords *image_coords,
GdkPoint *disp_coords, GdkPoint *disp_coords,
gint n_coords, gint n_coords,
gboolean use_offsets) gboolean use_offsets)
{ {
gint offset_x = 0; gint offset_x = 0;
gint offset_y = 0; gint offset_y = 0;
@ -425,11 +425,11 @@ gimp_display_shell_transform_coords (GimpDisplayShell *shell,
* objects can be rendered at the correct points on the display. * objects can be rendered at the correct points on the display.
**/ **/
void void
gimp_display_shell_transform_segments (GimpDisplayShell *shell, gimp_display_shell_transform_segments (const GimpDisplayShell *shell,
const BoundSeg *src_segs, const BoundSeg *src_segs,
GdkSegment *dest_segs, GdkSegment *dest_segs,
gint n_segs, gint n_segs,
gboolean use_offsets) gboolean use_offsets)
{ {
gint offset_x = 0; gint offset_x = 0;
gint offset_y = 0; gint offset_y = 0;
@ -489,11 +489,11 @@ gimp_display_shell_transform_segments (GimpDisplayShell *shell,
* that corresponds to the display viewport. * that corresponds to the display viewport.
**/ **/
void void
gimp_display_shell_untransform_viewport (GimpDisplayShell *shell, gimp_display_shell_untransform_viewport (const GimpDisplayShell *shell,
gint *x, gint *x,
gint *y, gint *y,
gint *width, gint *width,
gint *height) gint *height)
{ {
gint x1, y1, x2, y2; gint x1, y1, x2, y2;

View File

@ -20,61 +20,61 @@
#define __GIMP_DISPLAY_SHELL_TRANSFORM_H__ #define __GIMP_DISPLAY_SHELL_TRANSFORM_H__
void gimp_display_shell_transform_coordinate (GimpDisplayShell *shell, void gimp_display_shell_transform_coordinate (const GimpDisplayShell *shell,
GimpCoords *image_coords, GimpCoords *image_coords,
GimpCoords *display_coords); GimpCoords *display_coords);
void gimp_display_shell_untransform_coordinate (GimpDisplayShell *shell, void gimp_display_shell_untransform_coordinate (const GimpDisplayShell *shell,
GimpCoords *display_coords, GimpCoords *display_coords,
GimpCoords *image_coords); GimpCoords *image_coords);
void gimp_display_shell_transform_xy (GimpDisplayShell *shell, void gimp_display_shell_transform_xy (const GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gint *nx, gint *nx,
gint *ny, gint *ny,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_untransform_xy (GimpDisplayShell *shell, void gimp_display_shell_untransform_xy (const GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint *nx, gint *nx,
gint *ny, gint *ny,
gboolean round, gboolean round,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_transform_xy_f (GimpDisplayShell *shell, void gimp_display_shell_transform_xy_f (const GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gdouble *nx, gdouble *nx,
gdouble *ny, gdouble *ny,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell, void gimp_display_shell_untransform_xy_f (const GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gdouble *nx, gdouble *nx,
gdouble *ny, gdouble *ny,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_transform_points (GimpDisplayShell *shell, void gimp_display_shell_transform_points (const GimpDisplayShell *shell,
const GimpVector2 *points, const GimpVector2 *points,
GdkPoint *coords, GdkPoint *coords,
gint n_points, gint n_points,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_transform_coords (GimpDisplayShell *shell, void gimp_display_shell_transform_coords (const GimpDisplayShell *shell,
const GimpCoords *image_coords, const GimpCoords *image_coords,
GdkPoint *disp_coords, GdkPoint *disp_coords,
gint n_coords, gint n_coords,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_transform_segments (GimpDisplayShell *shell, void gimp_display_shell_transform_segments (const GimpDisplayShell *shell,
const BoundSeg *src_segs, const BoundSeg *src_segs,
GdkSegment *dest_segs, GdkSegment *dest_segs,
gint n_segs, gint n_segs,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_untransform_viewport (GimpDisplayShell *shell, void gimp_display_shell_untransform_viewport (const GimpDisplayShell *shell,
gint *x, gint *x,
gint *y, gint *y,
gint *width, gint *width,
gint *height); gint *height);
#endif /* __GIMP_DISPLAY_SHELL_TRANSFORM_H__ */ #endif /* __GIMP_DISPLAY_SHELL_TRANSFORM_H__ */