summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-04 20:45:25 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-05 12:08:51 +0200
commit351e57955755d9cc200155d6f9c1b7b5940fd979 (patch)
tree260d4c39e4c6f062d266262f785616bfdf008789
parent5cc6ddd70bde11c9bc2670d8a6555ec8e1bc800b (diff)
downloadcv-351e57955755d9cc200155d6f9c1b7b5940fd979.zip
cv-351e57955755d9cc200155d6f9c1b7b5940fd979.tar.gz
cv-351e57955755d9cc200155d6f9c1b7b5940fd979.tar.bz2
capture: Add code for scaling
But not yet used.
-rw-r--r--capture.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/capture.c b/capture.c
index 4b6404c..095c587 100644
--- a/capture.c
+++ b/capture.c
@@ -120,9 +120,21 @@ static gboolean
draw_cb(GtkWidget *widget, cairo_t *cr, gpointer userdata)
{
struct ct *ct = userdata;
+#if 0
+ double sx, sy;
+#endif
+ cairo_save(cr);
+#if 0
+ sx = gtk_widget_get_allocated_width(widget);
+ sx /= cairo_image_surface_get_width(ct->surface);
+ sy = gtk_widget_get_allocated_height(widget);
+ sy /= cairo_image_surface_get_height(ct->surface);
+ cairo_scale(cr, sx, sy);
+#endif
cairo_set_source_surface(cr, ct->surface, 0, 0);
cairo_paint(cr);
+ cairo_restore(cr);
if (ct->doing_rubberband)
draw_rubberband(ct, widget, cr);