diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-03-31 17:57:55 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-03-31 17:57:55 +0200 |
commit | 750012943aaf86c529bcf93b39dbbd7523e80d55 (patch) | |
tree | 9e8bb132dcee2f69c667880d6faaa964e016e72a | |
parent | 2892a3d7522d6b758d3efb5825348d2cd0be91c5 (diff) | |
download | cv-750012943aaf86c529bcf93b39dbbd7523e80d55.tar.gz cv-750012943aaf86c529bcf93b39dbbd7523e80d55.tar.bz2 cv-750012943aaf86c529bcf93b39dbbd7523e80d55.zip |
roi: No need to have a cairo_rectangle_t in do_roi
-rw-r--r-- | roi.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -109,14 +109,13 @@ static gboolean do_roi(struct roi *roi) { GdkPixbuf *match; - cairo_rectangle_t area; + double x, y, width, height; - calc_rubberband_rect(roi, &area.x, &area.y, &area.width, &area.height); - if (area.width < 1 || area.height < 1) + calc_rubberband_rect(roi, &x, &y, &width, &height); + if (width < 1 || 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, x, y, width, height); calc_roi_interval(roi, match); g_object_unref(match); |