Which part of the window is visible?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Which part of the window is visible?

vischer
I would like to know the visible rectangle of the current window.
I can control this via Image>Zoom>Set.., (i.e. dragging via macro command), but I only want to do it when I am sure that the desired location is outside the visible range - in order to avoid too much jumping.

Is there a macro command like
        getVisibleRect(x, y, w, h),
or perhaps
        getZoom(factor, left, top, w, h)?

Norbert
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Which part of the window is visible?

Michael Schmid
Hi Norbert,

looks like you can use the
  getDisplayedArea(x, y, width, height)
macro function.

Michael
________________________________________________________________
On Jun 3, 2015, at 08:33, Norbert Vischer wrote:

> I would like to know the visible rectangle of the current window.
> I can control this via Image>Zoom>Set.., (i.e. dragging via macro command), but I only want to do it when I am sure that the desired location is outside the visible range - in order to avoid too much jumping.
>
> Is there a macro command like
> getVisibleRect(x, y, w, h),
> or perhaps
> getZoom(factor, left, top, w, h)?
>
> Norbert
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html