summaryrefslogtreecommitdiff
path: root/roi.c
diff options
context:
space:
mode:
Diffstat (limited to 'roi.c')
-rw-r--r--roi.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/roi.c b/roi.c
index bd51563..100fbff 100644
--- a/roi.c
+++ b/roi.c
@@ -38,27 +38,22 @@ do_roi(struct roi *roi)
{
GdkPixbuf *match;
cairo_rectangle_t area;
- int x, y, i;
- int width, height;
+ gint x, y, i;
+ gint width, height;
gint stride, nch;
guchar *pix, *row;
gint s;
gint middle[3] = { 0, 0, 0 };
gint sigma[3] = { 0, 0, 0 };
- struct match_interval {
- gint min, max;
- } interval[3];
+ struct match_interval { gint min, max; } interval[3];
calc_rubberband_rect(roi, &area.x, &area.y, &area.width, &area.height);
if (area.width < 1 || area.height < 1)
return FALSE;
- match = gdk_pixbuf_new_subpixbuf(roi->input,
- area.x,
- area.y,
- area.width,
- area.height);
+ match = gdk_pixbuf_new_subpixbuf(roi->input, area.x, area.y,
+ area.width, area.height);
nch = gdk_pixbuf_get_n_channels(match);
stride = gdk_pixbuf_get_rowstride(match);
s = area.width * area.height;
@@ -166,7 +161,6 @@ button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer userdata
return TRUE;
roi->doing_rubberband = FALSE;
-
if (do_roi(roi))
gtk_widget_queue_draw(roi->drawing_area);