Revision: 1588
http://geeqie.svn.sourceforge.net/geeqie/?rev=1588&view=rev
Author: zas_
Date: 2009-03-30 19:01:09 +0000 (Mon, 30 Mar 2009)
Log Message:
-----------
Fixed bug where pixel/color information at x=0 coordinates werent shown:
- pixel-coordinates now calculated with floor
- guard for update in layout does not apply for 0 coordinates anymore
Patch by Ruben Stein.
Modified Paths:
--------------
trunk/src/layout_image.c
trunk/src/pixbuf-renderer.c
Modified: trunk/src/layout_image.c
===================================================================
--- trunk/src/layout_image.c 2009-03-30 17:52:14 UTC (rev 1587)
+++ trunk/src/layout_image.c 2009-03-30 19:01:09 UTC (rev 1588)
@@ -1541,7 +1541,7 @@
pixbuf_renderer_get_mouse_position(pr, &x_pixel, &y_pixel);
- if(x_pixel > 0 && y_pixel > 0)
+ if(x_pixel >= 0 && y_pixel >= 0)
{
gint r_mouse, g_mouse, b_mouse;
gint width, height;
Modified: trunk/src/pixbuf-renderer.c
===================================================================
--- trunk/src/pixbuf-renderer.c 2009-03-30 17:52:14 UTC (rev 1587)
+++ trunk/src/pixbuf-renderer.c 2009-03-30 19:01:09 UTC (rev 1588)
@@ -4197,8 +4197,8 @@
return FALSE;
}
- x_pixel = (gint)((gdouble)(pr->x_mouse - pr->x_offset + pr->x_scroll) /
pr->scale);
- y_pixel = (gint)((gdouble)(pr->y_mouse - pr->y_offset + pr->y_scroll) /
pr->scale);
+ x_pixel = floor((gdouble)(pr->x_mouse - pr->x_offset + pr->x_scroll) /
pr->scale);
+ y_pixel = floor((gdouble)(pr->y_mouse - pr->y_offset + pr->y_scroll) /
pr->scale);
x_pixel_clamped = CLAMP(x_pixel, 0, pr->image_width - 1);
y_pixel_clamped = CLAMP(y_pixel, 0, pr->image_height - 1);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn