the visible of a stack
Richard Gaskin
ambassador at fourthworld.com
Fri Sep 26 10:59:29 EDT 2008
Robert Brenstein wrote:
> On 25/09/08 at 13:15 -0700 Dick Kriesel apparently wrote:
>>Hi, Chipp. Here's a version that's effectively the same but that has a
>>couple minor advantages. First, it has a single exit point, possibly
>>improving maintainability. Second, it executes the corner functions only
>>once no matter how many screens there are, possibly improving performance.
>>
>>-- Dick
>>
>><script>
>>function isStackCurrentlyVisibleOnAnyMonitor pStack
>> --> pStack IS THE SHORT NAME OF STACK
>> put "false" into tResult
>> if pStack is among the lines of windows() then
>> if the visible of stack pStack then
>> if the blendlevel of stack pStack < 100 then
>> put the topleft of stack pStack into tTopLeft
>> put the topright of stack pStack into tTopRight
>> put the bottomleft of stack pStack into tBottomLeft
>> put the bottomright of stack pStack into tBottomRight
>> repeat for each line tScreenRect in the screenrects
>> if tTopLeft is within tScreenRect or \
>> tTopRight is within tScreenRect or \
>> tBottomLeft is within tScreenRect or \
>> tBottomRight is within tScreenRect then
>> put "true" into tResult
>> exit repeat
>> end if
>> end repeat
>> end if
>> end if
>> end if
>> return tResult
>>end isStackCurrentlyVisibleOnAnyMonitor
>></script>
>>
>
>
> Would this be a candidate for inclusion in the StandardLib?
I think that's an excellent suggestion.
Chipp, mind if we add it? With credit, of course.
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list