summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-31 16:48:14 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-31 16:49:46 +0200
commit62d1d3208ea961d19973fb84e43ceba1dcadc269 (patch)
tree72f07ea01451763c8ec63837b3000a808c853acf
parent1c2b1f500ca2b2a0532feb5d51ec3169039330e8 (diff)
downloadcv-62d1d3208ea961d19973fb84e43ceba1dcadc269.tar.gz
cv-62d1d3208ea961d19973fb84e43ceba1dcadc269.tar.bz2
cv-62d1d3208ea961d19973fb84e43ceba1dcadc269.zip
roi: Cleanup types and line-break usages
-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);