[Xfce4-commits] <ristretto:master> Remove box-zoom selection drawing
Stephan Arts
noreply at xfce.org
Mon Aug 8 15:04:08 CEST 2011
Updating branch refs/heads/master
to c1c9ec7cc7465d7c042ddbfe758446657553dc29 (commit)
from 777433e8be174ada99a1cdbe8bc945563fba1ecb (commit)
commit c1c9ec7cc7465d7c042ddbfe758446657553dc29
Author: Stephan Arts <stephan at xfce.org>
Date: Tue Jul 26 20:14:56 2011 +0200
Remove box-zoom selection drawing
src/image_viewer.c | 78 ----------------------------------------------------
1 files changed, 0 insertions(+), 78 deletions(-)
diff --git a/src/image_viewer.c b/src/image_viewer.c
index e5337ab..fff16a4 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -502,84 +502,6 @@ rstto_image_viewer_paint (GtkWidget *widget)
y2,
GDK_RGB_DITHER_NONE,
0,0);
-
- if(viewer->priv->motion.state == RSTTO_PICTURE_VIEWER_MOTION_STATE_BOX_ZOOM)
- {
- gdk_gc_set_foreground(gc,
- &(widget->style->fg[GTK_STATE_SELECTED]));
-
- if (viewer->priv->motion.x < viewer->priv->motion.current_x)
- {
- m_x1 = viewer->priv->motion.x;
- m_x2 = viewer->priv->motion.current_x;
- }
- else
- {
- m_x1 = viewer->priv->motion.current_x;
- m_x2 = viewer->priv->motion.x;
- }
- if (viewer->priv->motion.y < viewer->priv->motion.current_y)
- {
- m_y1 = viewer->priv->motion.y;
- m_y2 = viewer->priv->motion.current_y;
- }
- else
- {
- m_y1 = viewer->priv->motion.current_y;
- m_y2 = viewer->priv->motion.y;
- }
- if (m_y1 < y1)
- m_y1 = y1;
- if (m_x1 < x1)
- m_x1 = x1;
-
- if (m_x2 > x2 + x1)
- m_x2 = x2 + x1;
- if (m_y2 > y2 + y1)
- m_y2 = y2 + y1;
-
- if ((m_x2 - m_x1 >= 2) && (m_y2 - m_y1 >= 2))
- {
- GdkPixbuf *sub = gdk_pixbuf_new_subpixbuf(pixbuf,
- m_x1-x1,
- m_y1-y1,
- m_x2-m_x1,
- m_y2-m_y1);
- if(sub)
- {
- sub = gdk_pixbuf_composite_color_simple(sub,
- m_x2-m_x1,
- m_y2-m_y1,
- GDK_INTERP_BILINEAR,
- 200,
- 200,
- widget->style->bg[GTK_STATE_SELECTED].pixel,
- widget->style->bg[GTK_STATE_SELECTED].pixel);
-
- gdk_draw_pixbuf(GDK_DRAWABLE(buffer),
- gc,
- sub,
- 0,0,
- m_x1,
- m_y1,
- -1, -1,
- GDK_RGB_DITHER_NONE,
- 0, 0);
-
- gdk_pixbuf_unref(sub);
- sub = NULL;
- }
- }
-
- gdk_draw_rectangle(GDK_DRAWABLE(buffer),
- gc,
- FALSE,
- m_x1,
- m_y1,
- m_x2 - m_x1,
- m_y2 - m_y1);
- }
-
}
else
{
More information about the Xfce4-commits
mailing list