Posted by
Krs5 on
Feb 03, 2015; 3:51pm
URL: http://imagej.273.s1.nabble.com/Snap-Image-to-Screen-tp5011418p5011423.html
Dear Greg,
I think the macro code below does what you want
getLocationAndSize(x, y, width, height);
while (height+10 < screenHeight) {
nWidth = width * (screenHeight/height);
setLocation(0, 0, nWidth, screenHeight);
getLocationAndSize(x, y, width, height);
}
Best wishes
Kees
Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif________________________________________
From: ImageJ Interest Group [
[hidden email]] on behalf of Gregory James [
[hidden email]]
Sent: 03 February 2015 12:33
To:
[hidden email]
Subject: Snap Image to Screen
Dear ImageJ community,
I was just picking up on the thread "Re: Macro: Zoom in without changing window size (tiled display)" from last month. On a similar issue, does anyone know of a way to make the image snap to the screen in the macro language (like in Windows 7 when you drag a window to the edge of the screen)?
For example, if I have an image that is 1056x960 pixels (width x height) and my screen size is 1080x1920, I would like the image to occupy all the space vertically.
Is this possible to do in the macro language?
Thank you,
Greg.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html