summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-31 17:57:55 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-03-31 17:57:55 +0200
commit750012943aaf86c529bcf93b39dbbd7523e80d55 (patch)
tree9e8bb132dcee2f69c667880d6faaa964e016e72a
parent2892a3d7522d6b758d3efb5825348d2cd0be91c5 (diff)
downloadcv-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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/roi.c b/roi.c
index 4c07a96..1c69240 100644
--- a/roi.c
+++ b/roi.c
@@ -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);