[Xfce4-commits] <ristretto:master> Remove 0.5 offset, not needed for pixbufs
Stephan Arts
noreply at xfce.org
Mon Jan 9 21:48:01 CET 2012
Updating branch refs/heads/master
to 8f6a7aff8c6cfffb79770fa3736151d1d05d73d9 (commit)
from a0c87bfac2db5a04bfa0aaf87a73339ef6d5d819 (commit)
commit 8f6a7aff8c6cfffb79770fa3736151d1d05d73d9
Author: Stephan Arts <stephan at xfce.org>
Date: Mon Jan 9 21:45:08 2012 +0100
Remove 0.5 offset, not needed for pixbufs
src/image_viewer.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/image_viewer.c b/src/image_viewer.c
index 5aa7d64..3260767 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -966,10 +966,10 @@ paint_image (
case RSTTO_IMAGE_ORIENT_270:
viewer->priv->rendering.x_offset = ((gdouble)widget->allocation.width - (
(gdouble)viewer->priv->image_height *
- viewer->priv->scale) ) / 2.0+0.5;
+ viewer->priv->scale) ) / 2.0;
viewer->priv->rendering.y_offset = ((gdouble)widget->allocation.height - (
(gdouble)viewer->priv->image_width *
- viewer->priv->scale) ) / 2.0+0.5;
+ viewer->priv->scale) ) / 2.0;
viewer->priv->rendering.width =
(gdouble)viewer->priv->image_height * viewer->priv->scale;
viewer->priv->rendering.height =
@@ -980,10 +980,10 @@ paint_image (
default:
viewer->priv->rendering.x_offset = ((gdouble)widget->allocation.width - (
(gdouble)viewer->priv->image_width *
- viewer->priv->scale) ) / 2.0+0.5;
+ viewer->priv->scale) ) / 2.0;
viewer->priv->rendering.y_offset = ((gdouble)widget->allocation.height - (
(gdouble)viewer->priv->image_height *
- viewer->priv->scale) ) / 2.0+0.5;
+ viewer->priv->scale) ) / 2.0;
viewer->priv->rendering.width =
(gdouble)viewer->priv->image_width * viewer->priv->scale;
viewer->priv->rendering.height =
@@ -992,13 +992,13 @@ paint_image (
}
- if (viewer->priv->rendering.x_offset < 0.5)
+ if (viewer->priv->rendering.x_offset < 0)
{
- viewer->priv->rendering.x_offset = 0.5;
+ viewer->priv->rendering.x_offset = 0;
}
- if (viewer->priv->rendering.y_offset < 0.5)
+ if (viewer->priv->rendering.y_offset < 0)
{
- viewer->priv->rendering.y_offset = 0.5;
+ viewer->priv->rendering.y_offset = 0;
}
cairo_save (ctx);
More information about the Xfce4-commits
mailing list