swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] using tk from within a swarm model?


From: Eric McLeskey
Subject: [Swarm-Support] using tk from within a swarm model?
Date: Thu, 15 Apr 2004 10:41:01 -0600

Hi,
I'm working on a model display using circles to represent hydraulic nodes on
a canvas but I'm quickly realizing that there seems to be no way to zoom or
scale the canvas like there is with a zoomRaster.  I've been able to write
some C code that will scale the distance between the nodes so that the
canvas extent matches the extent of the (x,y) coordinates of my nodes.
Using this method, I've been able to simulate zooming but it's a one shot
deal at the beginning of the simulation and I can only "zoom in" on the
whole canvas.  Has anyone dealt with this problem before?  As I have been
researching this problem, I've discovered that tk commands  exist to scale
canvases and allow other things like adjusting background colors, setting
scrolling regions, etc.  However, in looking at the swarm gui libraries it
appears that many of these functions are not built into swarm.  I've also
found tk scripts on the net that allow scaling and zooming of canvases.
This leads me to my main question: Is it possible to run tk scripts from
within a swarm model?  If not, does anyone have any ideas of how I could
solve this problem?    

Thanks,

Eric

Eric McLeskey
Graduate Student
Institute for Natural Systems Engineering
Utah State University
1600 Canyon Road
Logan, UT  84321

phone: (435) 797-8039
fax:  (435) 797-8038
address@hidden
address@hidden

<<attachment: winmail.dat>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]