summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);