Skip to content
Snippets Groups Projects
Commit 420ee255 authored by David Tschumperlé's avatar David Tschumperlé
Browse files

.

parent 2ca6374e
No related branches found
No related tags found
No related merge requests found
...@@ -7988,8 +7988,8 @@ namespace cimg_library_suffixed { ...@@ -7988,8 +7988,8 @@ namespace cimg_library_suffixed {
return _empty; return _empty;
} }
   
#define cimg_fitscreen(dx,dy,dz) CImgDisplay::_fitscreen(dx,dy,dz,480,-85,false), \ #define cimg_fitscreen(dx,dy,dz) CImgDisplay::_fitscreen(dx,dy,dz,128,-85,false), \
CImgDisplay::_fitscreen(dx,dy,dz,480,-85,true) CImgDisplay::_fitscreen(dx,dy,dz,128,-85,true)
static unsigned int _fitscreen(const unsigned int dx, const unsigned int dy, const unsigned int dz, static unsigned int _fitscreen(const unsigned int dx, const unsigned int dy, const unsigned int dz,
const int dmin, const int dmax, const bool return_y) { const int dmin, const int dmax, const bool return_y) {
const int const int
...@@ -52092,7 +52092,9 @@ namespace cimg_library_suffixed { ...@@ -52092,7 +52092,9 @@ namespace cimg_library_suffixed {
_XYZ[2] = (unsigned int)(z0 + z1)/2; _XYZ[2] = (unsigned int)(z0 + z1)/2;
} }
x0 = 0; y0 = 0; z0 = 0; x1 = width() - 1; y1 = height() - 1; z1 = depth() - 1; x0 = 0; y0 = 0; z0 = 0; x1 = width() - 1; y1 = height() - 1; z1 = depth() - 1;
disp.resize(cimg_fitscreen(_width,_height,_depth),false);
oldw = disp._width; oldh = disp._height; oldw = disp._width; oldh = disp._height;
resize_disp = true;
reset_view = false; reset_view = false;
} }
if (!x0 && !y0 && !z0 && x1==width() - 1 && y1==height() - 1 && z1==depth() - 1) { if (!x0 && !y0 && !z0 && x1==width() - 1 && y1==height() - 1 && z1==depth() - 1) {
...@@ -52104,10 +52106,11 @@ namespace cimg_library_suffixed { ...@@ -52104,10 +52106,11 @@ namespace cimg_library_suffixed {
dx = 1U + x1 - x0, dy = 1U + y1 - y0, dz = 1U + z1 - z0, dx = 1U + x1 - x0, dy = 1U + y1 - y0, dz = 1U + z1 - z0,
tw = dx + (dz>1?dz:0U), th = dy + (dz>1?dz:0U); tw = dx + (dz>1?dz:0U), th = dy + (dz>1?dz:0U);
if (!is_empty() && !disp.is_fullscreen() && resize_disp) { if (!is_empty() && !disp.is_fullscreen() && resize_disp) {
const float
ttw = (float)tw*disp.width()/oldw, tth = (float)th*disp.height()/oldh,
dM = std::max(ttw,tth), diM = (float)std::max(disp.width(),disp.height());
const unsigned int const unsigned int
ttw = tw*disp.width()/oldw, tth = th*disp.height()/oldh, imgw = (unsigned int)(ttw*diM/dM), imgh = (unsigned int)(tth*diM/dM);
dM = std::max(ttw,tth), diM = (unsigned int)std::max(disp.width(),disp.height()),
imgw = std::max(16U,ttw*diM/dM), imgh = std::max(16U,tth*diM/dM);
disp.set_fullscreen(false).resize(cimg_fitscreen(imgw,imgh,1),false); disp.set_fullscreen(false).resize(cimg_fitscreen(imgw,imgh,1),false);
resize_disp = false; resize_disp = false;
} }
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<a href="http://cimg.eu"><img src="http://cimg.eu/img/CImgLogo2.jpg" alt="" border="0" /></a><br/> <a href="http://cimg.eu"><img src="http://cimg.eu/img/CImgLogo2.jpg" alt="" border="0" /></a><br/>
</center> </center>
<center><font size="-1" color="#777777"> <center><font size="-1" color="#777777">
Latest stable version: <b><a href="http://cimg.eu/files/CImg_2.4.0.zip">2.4.0</a></b> Latest stable version: <b><a href="http://cimg.eu/files/CImg_2.4.0.zip">2.4.0</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">2.4.1</a></b>
</font></center> </font></center>
</td></tr> </td></tr>
<tr bgcolor="#FFFFFF"><td><hr noshade size="1" style="border-top: 1px solid #ccc;"/></td></tr> <tr bgcolor="#FFFFFF"><td><hr noshade size="1" style="border-top: 1px solid #ccc;"/></td></tr>
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<a href="http://cimg.eu"><img src="http://cimg.eu/img/CImgLogo2.jpg" alt="" border="0" /></a><br/> <a href="http://cimg.eu"><img src="http://cimg.eu/img/CImgLogo2.jpg" alt="" border="0" /></a><br/>
</center> </center>
<center><font size="-1" color="#777777"> <center><font size="-1" color="#777777">
Latest stable version: <b><a href="http://cimg.eu/files/CImg_2.4.0.zip">2.4.0</a></b> Latest stable version: <b><a href="http://cimg.eu/files/CImg_2.4.0.zip">2.4.0</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">2.4.1</a></b>
</font></center> </font></center>
</td></tr> </td></tr>
<tr bgcolor="#FFFFFF"><td><hr noshade size="1" style="border-top: 1px solid #ccc;"/></td></tr> <tr bgcolor="#FFFFFF"><td><hr noshade size="1" style="border-top: 1px solid #ccc;"/></td></tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment