Commit 8b3c9626 authored by ROOL's avatar ROOL 🤖
Browse files

Improve reciprocity of zooming

Detail:
  Previously a small (eg. 100x100) sprite being
  * zoomed in until it fills the screen
  * zoom 1:1
  * zoom in again
  would lead to a large black border in width as the sprite grew, but not in height. Now ensures the width is clamped to the minimum sprite width.
Admin:
  Submission for the Paint bounty.

Version 2.30. Tagged as 'Paint-2_30'
parent 9e2713db
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
Module_MajorVersion SETS "2.29"
Module_Version SETA 229
Module_MajorVersion SETS "2.30"
Module_Version SETA 230
Module_MinorVersion SETS ""
Module_Date SETS "14 Dec 2019"
Module_ApplicationDate SETS "14-Dec-19"
Module_Date SETS "17 Dec 2019"
Module_ApplicationDate SETS "17-Dec-19"
Module_ComponentName SETS "Paint"
Module_FullVersion SETS "2.29"
Module_HelpVersion SETS "2.29 (14 Dec 2019)"
Module_FullVersion SETS "2.30"
Module_HelpVersion SETS "2.30 (17 Dec 2019)"
END
/* (2.29)
/* (2.30)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 2.29
#define Module_MajorVersion_CMHG 2.30
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Dec 2019
#define Module_Date_CMHG 17 Dec 2019
#define Module_MajorVersion "2.29"
#define Module_Version 229
#define Module_MajorVersion "2.30"
#define Module_Version 230
#define Module_MinorVersion ""
#define Module_Date "14 Dec 2019"
#define Module_Date "17 Dec 2019"
#define Module_ApplicationDate "14-Dec-19"
#define Module_ApplicationDate "17-Dec-19"
#define Module_ComponentName "Paint"
#define Module_FullVersion "2.29"
#define Module_HelpVersion "2.29 (14 Dec 2019)"
#define Module_LibraryVersionInfo "2:29"
#define Module_FullVersion "2.30"
#define Module_HelpVersion "2.30 (17 Dec 2019)"
#define Module_LibraryVersionInfo "2:30"
......@@ -1387,6 +1387,9 @@ wimp_wstate menus_showmag_getstate (void *handle, int window_width, int window_h
main_current_options.zoom.div =
sprite->blobsize.scale_ydiv = sprite->blobsize.scale_xdiv;
sprwindow_set_work_extent_custom (sprite->window, FALSE,
MAX(window_width, sprite->minwidth), window_height);
if (window_width < 1)
{ window_width = (wstate.o.box.x1-wstate.o.box.x0)*d*main_current_options.zoom.mul/
(m*main_current_options.zoom.div);
......@@ -1398,8 +1401,6 @@ wimp_wstate menus_showmag_getstate (void *handle, int window_width, int window_h
window_width = sprite->minwidth;
ftracef1 ("Window width will be set to %d\n", window_width);
sprwindow_set_work_extent_custom (sprite->window, FALSE, window_width, window_height);
/* now scale window size too */
spencer (ftracef (__FILE__, __LINE__, "psize %d %d %d %d\n",
wstate.o.box.x0, wstate.o.box.x1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment