diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-04-22 12:45:50 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-04-22 12:45:50 +0200 |
commit | 8821ce80b1139b0104439a9e87d8d8e6e3b0b595 (patch) | |
tree | 16f615b82047cb0493162966caf7a92931552b28 /src/winwidget.h | |
parent | ab40571115f0a3badc2cd268a93ef981ec2af638 (diff) |
Partially fix zoom mode
Does not yet work with initial zoom value != 100%
Diffstat (limited to 'src/winwidget.h')
-rw-r--r-- | src/winwidget.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/winwidget.h b/src/winwidget.h index dd24f8f..8f03323 100644 --- a/src/winwidget.h +++ b/src/winwidget.h @@ -92,20 +92,27 @@ struct __winwidget { gib_list *file; unsigned char visible; - /* Stuff for zooming */ + /* panning, zooming, etc. */ unsigned char mode; - unsigned char caption_entry; /* are we in caption entry mode? */ + unsigned char caption_entry; + + /* image offset from window top left */ + int im_x; + int im_y; + + /* same, as cache for zoom mode */ + int orig_im_x; + int orig_im_y; + + /* From 0 (not visible) to 1.00 (actual size) + * all the way up to INT_MAX (eww) + */ + double zoom; + double old_zoom; - /* New stuff */ - int im_x; /* image offset from window top left */ - int im_y; /* image offset from window top left */ - double zoom; /* From 0 (not visible) to 1.00 (actual size) - all the way up to INT_MAX (ouch) */ int click_offset_x; int click_offset_y; - int im_click_offset_x; - int im_click_offset_y; unsigned char has_rotated; }; |