Re: "marching ants" rubberband box [message #31971] |
Thu, 05 September 2002 05:16  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
ronn kling (ronn@rlkling.com) writes:
> I think you can do this pretty easy in Object Graphics. You would draw the
> box with an IDLgrPolyline object and then just change the stippling pattern
> to mimic motion at each event (cursor motion or timing). The stippling
> pattern is a bitmask that you pass with the linestyle keyword. Look at the
> init method of IDLgrPolyline and the linestyle keyword.
In Photoshop, the ants keep marching while you are drawing the
box and even afterwards, when there is no movement at all.
The only way to simulate that would be timer events, but
there would be a lot of them. And--I don't know--it doesn't
seem like science to me. The fact that there doesn't seem
to be much in the way of CPU time taken up while the ants
do their thing makes me think it must be some kind of build-in
system functionality. It kind of smacks of Microsoft, don't
you think? At least it reminds me of that stupid paper clip
that always annoys the hell out of me when I exit Excel. :-(
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|
|
|
|
|
|
|
|
|
Re: "marching ants" rubberband box [message #32042 is a reply to message #31971] |
Fri, 06 September 2002 12:03  |
graves
Messages: 7 Registered: September 2001
|
Junior Member |
|
|
> In Photoshop, the ants keep marching while you are drawing the
> box and even afterwards, when there is no movement at all.
> The only way to simulate that would be timer events, but
> there would be a lot of them. And--I don't know--it doesn't
> seem like science to me. The fact that there doesn't seem
> to be much in the way of CPU time taken up while the ants
> do their thing makes me think it must be some kind of build-in
> system functionality.
This had occurred to me also, that marching ants would require a lot
of the CPU unless the operation was incorporated into the OS and
didn't require an endless string of timer events.
Thanks for the suggestions. I too was entranced by this devilish
programming challenge. :)
Ted
graves@helix.mgh.harvard.edu
|
|
|
Re: "marching ants" rubberband box [message #32067 is a reply to message #31971] |
Thu, 05 September 2002 08:52  |
Pavel A. Romashkin
Messages: 531 Registered: November 2000
|
Senior Member |
|
|
David Fanning wrote:
>
> At least it reminds me of that stupid paper clip
> that always annoys the hell out of me when I exit Excel. :-(
You know, that one can be turned off. Or, like I have, you can change it
to a purring cat. If you choose to do that, you will immediately see
that some department of Microsoft had *way* too much time on their
hands, because the cat sleeps, scratches, meows, sleeps, catches
butterflies and does all sorts of other things. And it behaves
differently in different Office programs.
Oh well. It has a lot more personality than the clip. I even leave it on
the desktop now, while I could not stand the clip.
Cheers,
Pavel
|
|
|