Hi.
--- In [email protected], sgp <[EMAIL PROTECTED]> wrote:
> I also noticed that it isn't possible to point to any pixel on the
screen, once I stop the mouse and then I try
> to move 1px to the side, it moves 2-3 pxs, I'm not sure exactly,
but certainly not 1px. Perhaps it's just my
> clumsy hand, but...
No. I'm just as clumsy as you.
But I found the mistake. The mouse is exactly over 1 pixel. Now Sean
defines the region that's going to be enlarged:
xmouse-nRect/nZoom,ymouse-nRect/nZoom,;;+
nRect/nZoom*2,nRect/nZoom*2
that's 10 pixel up and left and then 20 pixels down and right, which
gives you a 20x20 pixel section. But 20x20 pixel can't have a center
pixel. Add one pixel right and down and you're set:
xmouse-nRect/nZoom,ymouse-nRect/nZoom,;;+
nRect/nZoom*2+1,nRect/nZoom*2+1
Also the color picking is 100% precise then with:
nColor=win.getpixel(xmouse,ymouse)++" (#"++;;+
fill("000000",case("upper",win.hex(win.getpixel1(xmouse,ymouse))))
++")"
No xmouse-1 anymore.
I think it might be better to define a pixel-radius and a zoom-
factor for the script to avoid rounding mistakes, like a radius of
10 and a zoom factor of 5, which would give you a section of 21x21
and an enlarged picture of 105x105.
Gee, I definitely have to stop posting now, before it becomes my
full-time job.
Mockey
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/