Commit d88c150c authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

use gdouble instead of gfloat for x and y scale factors so gfloat's

2004-02-04  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-render.c (struct RenderInfo)
	(render_image_accelerate_scaling): use gdouble instead of gfloat
	for x and y scale factors so gfloat's limited precision can't add
	up to off-by-one pixel errors. Fixes display artefacts (missing
	updates) at the bottom and right sides of updated areas at certain
	irrational zoom factors like 1:3.
parent b8c41b9e
2004-02-04 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-render.c (struct RenderInfo)
(render_image_accelerate_scaling): use gdouble instead of gfloat
for x and y scale factors so gfloat's limited precision can't add
up to off-by-one pixel errors. Fixes display artefacts (missing
updates) at the bottom and right sides of updated areas at certain
irrational zoom factors like 1:3.
2004-02-04 Sven Neumann <sven@gimp.org>
 
* app/gui/image-menu.c (image_menu_entries): added percentages to
......@@ -56,8 +56,8 @@ struct _RenderInfo
guchar *dest;
gint x, y;
gint w, h;
gfloat scalex;
gfloat scaley;
gdouble scalex;
gdouble scaley;
gint src_x, src_y;
gint src_bpp;
gint dest_bpp;
......@@ -288,7 +288,7 @@ static void render_image_init_info (RenderInfo *info,
static guint * render_image_init_alpha (gint mult);
static guchar * render_image_accelerate_scaling (gint width,
gint start,
gfloat scalex);
gdouble scalex);
static guchar * render_image_tile_fault (RenderInfo *info);
......@@ -794,8 +794,8 @@ render_image_init_info (RenderInfo *info,
info->h = h;
info->scalex = SCALEFACTOR_X (shell);
info->scaley = SCALEFACTOR_Y (shell);
info->src_x = (gfloat) info->x / info->scalex;
info->src_y = (gfloat) info->y / info->scaley;
info->src_x = (gdouble) info->x / info->scalex;
info->src_y = (gdouble) info->y / info->scaley;
info->src_bpp = gimp_image_projection_bytes (shell->gdisp->gimage);
info->dest = shell->render_buf;
info->dest_bpp = 3;
......@@ -835,9 +835,9 @@ render_image_init_alpha (gint mult)
}
static guchar *
render_image_accelerate_scaling (gint width,
gint start,
gfloat scalex)
render_image_accelerate_scaling (gint width,
gint start,
gdouble scalex)
{
static guchar *scale = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment