Re: Apology and a question

Posted by Tony Collins-4 on
URL: http://imagej.273.s1.nabble.com/Apology-and-a-question-tp3701250p3701251.html

I was wondering about the zooming problem. Something I have had at the
back of my mind for some time and now may be a good time to mention it.
It would be nice if you held the shift key down and used the zoom tool
it would allow you to make a selection then "Zoom to selection".

I've not given this much of a test, but something like this hacked from
the "line tool" macro:

macro "Zoom-to-selection Tool " {
        requires("1.30l");
        getCursorLoc(x, y, z, flags);
        xstart = x; ystart = y;
        x2=x; y2=y;        
        while (true) {
            getCursorLoc(x, y, z, flags);
            if (flags&16==0) {
                 makeRectangle(xstart, ystart,x-xstart, y-ystart);
                run("To Selection");
                exit;
            }
            if (x!=x2 || y!=y2)
                makeRectangle(xstart, ystart, x-xstart, y-ystart);
            x2=x; y2=y;
            wait(10);
        };
    }

Tony

> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Jon
> Harman
> Sent: Friday, October 20, 2006 10:42 AM
> To: [hidden email]
> Subject: Apology and a question
>
> Hi,
>
> In a previous post I complained about ImageJ zooming behavior. It
turns
> out that my issues with zooming had been fixed in August by adding the
> "zoom indicator".