#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" Magnifying Images Only 2 By Eric Chatonet 2/12/05 http://www.sosmartsoftware.com/ --------------------------- on preOpenStack if the short name of me <> the short name of this stack then exit preOpenStack set the alwaysBuffer of image "Loupe" to true set the uCurMag of this stack to 4 set the hilitedButton of grp "Loupe" to 2 set the style of this stack to "modeless" set the loc of this stack to the screenLoc end preOpenStack --------------------------- on mouseMove local tScreenMouseLoc,tDelta,tGlobalImgRect,tGlobalRestrictedAreaRect,tLoc local tHalfWidth,tRect,tTrashVar,imageTemp ----- if "image" is in the target then put the screenMouseLoc into tScreenMouseLoc put the width of img "Loupe" / 2 / the uCurMag of this stack into tDelta put the left of the target + the left of this stack,the top of the target + the top of this stack,the right of the target + the left of this stack,the bottom of the target + the top of this stack into tGlobalImgRect put tGlobalImgRect into tGlobalRestrictedAreaRect add tDelta to item 1 of tGlobalRestrictedAreaRect add tDelta to item 2 of tGlobalRestrictedAreaRect subtract tDelta from item 3 of tGlobalRestrictedAreaRect subtract tDelta from item 4 of tGlobalRestrictedAreaRect ----- put item 1 of tGlobalImgRect,item 2 of tGlobalImgRect,item 1 of tGlobalRestrictedAreaRect,item 2 of tGlobalRestrictedAreaRect into tTopLeftRect put item 1 of tGlobalImgRect,item 4 of tGlobalRestrictedAreaRect,item 1 of tGlobalRestrictedAreaRect,item 4 of tGlobalImgRect into tBotLeftRect put item 3 of tGlobalRestrictedAreaRect,item 2 of tGlobalImgRect,item 3 of tGlobalImgRect,item 2 of tGlobalRestrictedAreaRect into tTopRightRect put item 3 of tGlobalRestrictedAreaRect,item 4 of tGlobalRestrictedAreaRect,item 3 of tGlobalImgRect,item 4 of tGlobalImgRect into tBotRightRect ----- switch case tScreenMouseLoc is within tGlobalRestrictedAreaRect put tScreenMouseLoc into tLoc break case tScreenMouseLoc is within tTopLeftRect put item 1 of tGlobalRestrictedAreaRect,item 2 of tGlobalRestrictedAreaRect into tLoc break case tScreenMouseLoc is within tBotLeftRect put item 1 of tGlobalRestrictedAreaRect,item 4 of tGlobalRestrictedAreaRect into tLoc break case tScreenMouseLoc is within tTopRightRect put item 3 of tGlobalRestrictedAreaRect,item 2 of tGlobalRestrictedAreaRect into tLoc break case tScreenMouseLoc is within tBotRightRect put item 3 of tGlobalRestrictedAreaRect,item 4 of tGlobalRestrictedAreaRect into tLoc break case item 1 of tScreenMouseLoc < item 1 of tGlobalRestrictedAreaRect -- left border put item 1 of tGlobalRestrictedAreaRect,item 2 of tScreenMouseLoc into tLoc break case item 2 of tScreenMouseLoc < item 2 of tGlobalRestrictedAreaRect -- top border put item 1 of tScreenMouseLoc,item 2 of tGlobalRestrictedAreaRect into tLoc break case item 1 of tScreenMouseLoc > item 3 of tGlobalRestrictedAreaRect -- right border put item 3 of tGlobalRestrictedAreaRect,item 2 of tScreenMouseLoc into tLoc break case item 2 of tScreenMouseLoc > item 2 of tGlobalRestrictedAreaRect -- bottom border put item 1 of tScreenMouseLoc,item 4 of tGlobalRestrictedAreaRect into tLoc break default set the text of image "Loupe" of this stack to empty exit mouseMove end switch ----- put the width of img "Loupe" / the uCurMag of this stack / 2 into tHalfWidth put item 1 of tLoc - tHalfWidth,item 2 of tLoc - tHalfWidth,item 1 of tLoc + tHalfWidth,item 2 of tLoc + tHalfWidth into tRect ----- put flushEvents("all") into tTrashVar lock screen set the showBorder of image "Loupe" to true export snapshot from rect tRect to imageTemp as PNG set the text of image "Loupe" to imageTemp unlock screen else pass mouseMove end mouseMove --------------------------- on mouseEnter if "image" is in the target then if the platform = "MacOS" then set the cursor to 2521 else set the cursor to 2478 lock cursor end if end mouseEnter --------------------------- on mouseLeave if "image" is in the target then set the text of image "Loupe" of this stack to empty set the showBorder of image "Loupe" of this stack to false unlock cursor end if end mouseLeave uCurMag 4 Magnifying Images Only W Lucida Grande U Lucida Grande U Lucida Grande AU Lucida Grande cREVGeometryCache stackID 2932 cREVGeneral scriptChecksum 9 2_S debugObjects bookmarks handlerList ,preOpenStack mouseMove mouseEnter mouseLeavetempScript prevHandler mouseEnterscriptSelection char 4064 to 4063script +
By Eric Chatonet
2/12/05
http://www.sosmartsoftware.com/
---------------------------
on preOpenStack
if the short name of me <> the short name of this stack then exit preOpenStack
set the alwaysBuffer of image "Loupe" to true
set the uCurMag of this stack to 4
set the hilitedButton of grp "Loupe" to 2
set the style of this stack to "modeless"
set the loc of this stack to the screenLoc
end preOpenStack
---------------------------
on mouseMove
local tScreenMouseLoc,tDelta,tGlobalImgRect,tGlobalRestrictedAreaRect,tLoc
local tHalfWidth,tRect,tTrashVar,imageTemp
-----
if "image" is in the target then
put the screenMouseLoc into tScreenMouseLoc
put the width of img "Loupe" / 2 / the uCurMag of this stack into tDelta
put the left of the target + the left of this stack,the top of the target + the top of this stack,the right of the target + the left of this stack,the bottom of the target + the top of this stack into tGlobalImgRect
put tGlobalImgRect into tGlobalRestrictedAreaRect
add tDelta to item 1 of tGlobalRestrictedAreaRect
add tDelta to item 2 of tGlobalRestrictedAreaRect
subtract tDelta from item 3 of tGlobalRestrictedAreaRect
subtract tDelta from item 4 of tGlobalRestrictedAreaRect
-----
put item 1 of tGlobalImgRect,item 2 of tGlobalImgRect,item 1 of tGlobalRestrictedAreaRect,item 2 of tGlobalRestrictedAreaRect into tTopLeftRect
put item 1 of tGlobalImgRect,item 4 of tGlobalRestrictedAreaRect,item 1 of tGlobalRestrictedAreaRect,item 4 of tGlobalImgRect into tBotLeftRect
put item 3 of tGlobalRestrictedAreaRect,item 2 of tGlobalImgRect,item 3 of tGlobalImgRect,item 2 of tGlobalRestrictedAreaRect into tTopRightRect
put item 3 of tGlobalRestrictedAreaRect,item 4 of tGlobalRestrictedAreaRect,item 3 of tGlobalImgRect,item 4 of tGlobalImgRect into tBotRightRect
-----
switch
case tScreenMouseLoc is within tGlobalRestrictedAreaRect
put tScreenMouseLoc into tLoc
break
case tScreenMouseLoc is within tTopLeftRect
put item 1 of tGlobalRestrictedAreaRect,item 2 of tGlobalRestrictedAreaRect into tLoc
break
case tScreenMouseLoc is within tBotLeftRect
put item 1 of tGlobalRestrictedAreaRect,item 4 of tGlobalRestrictedAreaRect into tLoc
break
case tScreenMouseLoc is within tTopRightRect
put item 3 of tGlobalRestrictedAreaRect,item 2 of tGlobalRestrictedAreaRect into tLoc
break
case tScreenMouseLoc is within tBotRightRect
put item 3 of tGlobalRestrictedAreaRect,item 4 of tGlobalRestrictedAreaRect into tLoc
break
case item 1 of tScreenMouseLoc < item 1 of tGlobalRestrictedAreaRect -- left border
put item 1 of tGlobalRestrictedAreaRect,item 2 of tScreenMouseLoc into tLoc
break
case item 2 of tScreenMouseLoc < item 2 of tGlobalRestrictedAreaRect -- top border
put item 1 of tScreenMouseLoc,item 2 of tGlobalRestrictedAreaRect into tLoc
break
case item 1 of tScreenMouseLoc > item 3 of tGlobalRestrictedAreaRect -- right border
put item 3 of tGlobalRestrictedAreaRect,item 2 of tScreenMouseLoc into tLoc
break
case item 2 of tScreenMouseLoc > item 2 of tGlobalRestrictedAreaRect -- bottom border
put item 1 of tScreenMouseLoc,item 4 of tGlobalRestrictedAreaRect into tLoc
break
default
set the text of image "Loupe" of this stack to empty
exit mouseMove
end switch
-----
put the width of img "Loupe" / the uCurMag of this stack / 2 into tHalfWidth
put item 1 of tLoc - tHalfWidth,item 2 of tLoc - tHalfWidth,item 1 of tLoc + tHalfWidth,item 2 of tLoc + tHalfWidth into tRect
-----
put flushEvents("all") into tTrashVar
lock screen
set the showBorder of image "Loupe" to true
export snapshot from rect tRect to imageTemp as PNG
set the text of image "Loupe" to imageTemp
unlock screen
else pass mouseMove
end mouseMove
---------------------------
on mouseEnter
if "image" is in the target then
if the platform = "MacOS" then set the cursor to 2521
else set the cursor to 2478
lock cursor
end if
end mouseEnter
---------------------------
on mouseLeave
if "image" is in the target then
set the text of image "Loupe" of this stack to empty
set the showBorder of image "Loupe" of this stack to false
unlock cursor
end if
end mouseLeave
@ cREVGeometryCacheIDs 1107937926667 10291114189850487 22321107937914788 10281108242250532 10231129912669769 25211107937933766 10301107962097453 10121129912617034 24781108242917169 10271107958113151 10071107986708537 1021 cREVGeometrycache order total 11 cREVGeneral bookmarks handlerList tempScript prevHandler script ` 2V@ / JFIF d d Ducky Adobe d #%'%#//33//@@@@@@@@@@@@@@@&&0##0+.'''.+550055@@?@@@@@@@@@@@@ @" !1AQaq"2BR#b3r$c%C4 !1AQaq"2RBrbC ? SyEP(P@QE$:T ( )EQAEP@QEQE QEQE (X TP@RE :TFt )ҢIQJ N tQ@:)S ()Ң*( )Q@:)QBQ@B*tQRJ)Ң QJ@:)SN(*(E*(E*(E*(E*()PTTEPQҢ@Ҡ*tFhQB NtR:TPTPTPTPTPP/JGE**wJJJt(E R@TM)QB!*)Q@:uwKp( ʢ@nMcu`@.oQQXlu@KֺnFVE*+FGE*(E*(E*(`)_xW@b#֥0+Z|Qxx24RJҠE E E QJ E Rf8ݧ|am~[*ƹs; ºw_/38D y 71YNF+4-T_Xqy³2Y|k|KVc),i>2TgnV_d l <8U'!TM< ~f(T&㵏SmMen]٧^