From 351e57955755d9cc200155d6f9c1b7b5940fd979 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 4 Apr 2012 20:45:25 +0200 Subject: capture: Add code for scaling But not yet used. --- capture.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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); -- cgit