#!/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 "$@" Colliding Polygons pnf U Geneva P function firstWithinSecond grc1,grc2 put the points of grc grc1 into myPolyPoints1 repeat for each line tPoint in myPolyPoints1 if within(grc grc2,tPoint) then return "true" end repeat return false end firstWithinSecond nf cREVGeneral scriptChecksum +`4n5\5 bookmarks handlerList firstWithinSecondscriptSelection char 88 to 87prevHandler checkwithintempScript script d
function firstWithinSecond grc1,grc2
put the points of grc grc1 into myPolyPoints1
repeat for each line tPoint in myPolyPoints1
if within(grc grc2,tPoint) then return "true"
end repeat
return false
end firstWithinSecond
@ cREVGeneral bookmarks handlerList tempScript prevHandler scriptSelection char 1 to 0script myPoly1 KR;local myName on mouseUP put "" into myName end mouseUP on mouseDown put the name of me into myName end mouseDown on mouseMove x,y if myname is empty then exit mouseMove set the loc of me to x,y if firstWithinSecond("mypoly1","mypoly2")or firstWithinSecond("mypoly2","mypoly1") then beep end mouseMove K L - cREVGeneral scriptChecksum 'o+eR6 bookmarks revUniqueID 1080148814514handlerList mouseUP mouseDown mouseMovescriptSelection char 290 to 289prevHandler mouseDowntempScript script elocal myName
on mouseUP
put "" into myName
end mouseUP
on mouseDown
put the name of me into myName
end mouseDown
on mouseMove x,y
if myname is empty then exit mouseMove
set the loc of me to x,y
if firstWithinSecond("mypoly1","mypoly2")or firstWithinSecond("mypoly2","mypoly1") then beep
end mouseMove
myPoly2 KR