mirror of https://github.com/GNOME/gimp.git
Fixed regression at zoom levels > 100%, and moved some floating point code
* app/display/gimpdisplayshell-render.c: Fixed regression at zoom levels > 100%, and moved some floating point code out of the worker function. svn path=/trunk/; revision=23251
This commit is contained in:
parent
611a104c34
commit
38dacc4571
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2007-08-14 Øyvind Kolås <pippin@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell-render.c: Fixed regression at zoom
|
||||
levels > 100%, and moved some floating point code out of the worker
|
||||
function.
|
||||
|
||||
2007-08-14 Raphaël Quinet <raphael@gimp.org>
|
||||
|
||||
* plug-ins/common/dicom.c
|
||||
* plug-ins/common/psd-load.c
|
||||
* plug-ins/common/sunras.c: applied patch from Nils Philippsen
|
||||
that replaces several calls to g_error() by g_message() and
|
||||
gimp_quit() so that GIMP does not complain when a plug-in exits.
|
||||
Fixes bug #466610.
|
||||
|
||||
2007-08-14 Raphaël Quinet <raphael@gimp.org>
|
||||
|
||||
* plug-ins/common/dicom.c
|
||||
|
|
|
@ -67,6 +67,9 @@ struct _RenderInfo
|
|||
gint dest_bpp;
|
||||
gint dest_bpl;
|
||||
gint dest_width;
|
||||
|
||||
gint xstart;
|
||||
gint xdelta;
|
||||
};
|
||||
|
||||
static void gimp_display_shell_setup_render_info_scale
|
||||
|
@ -876,6 +879,9 @@ gimp_display_shell_setup_render_info_scale (RenderInfo *info,
|
|||
|
||||
info->src_x = (gdouble) info->x / info->scalex;
|
||||
info->src_y = (gdouble) info->y / info->scaley;
|
||||
|
||||
info->xstart = (info->src_x + ((info->x/info->scalex)-floor(info->x/info->scalex))) * 65536.0;
|
||||
info->xdelta = (1 << 16) * (1.0/info->scalex);
|
||||
}
|
||||
|
||||
static const guint *
|
||||
|
@ -908,7 +914,7 @@ render_image_tile_fault (RenderInfo *info)
|
|||
guchar *dest;
|
||||
gint width;
|
||||
gint tilex;
|
||||
gint stepx;
|
||||
gint xdelta;
|
||||
gint bpp;
|
||||
glong x;
|
||||
|
||||
|
@ -924,12 +930,14 @@ render_image_tile_fault (RenderInfo *info)
|
|||
bpp = tile_manager_bpp (info->src_tiles);
|
||||
dest = tile_buf;
|
||||
|
||||
x = info->src_x << 16;
|
||||
x = info->xstart;
|
||||
|
||||
|
||||
width = info->w;
|
||||
|
||||
tilex = info->src_x / TILE_WIDTH;
|
||||
|
||||
stepx = (1 << 16) * (1.0/info->scalex);
|
||||
xdelta = info->xdelta;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -949,7 +957,7 @@ render_image_tile_fault (RenderInfo *info)
|
|||
*dest++ = *s++;
|
||||
}
|
||||
|
||||
x += stepx;
|
||||
x += xdelta;
|
||||
skipped = (x >> 16) - src_x;
|
||||
if (skipped)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue