Changeset 1985 for branches/blt4/gui/scripts/heightmapviewer.tcl
- Timestamp:
- Dec 8, 2010, 2:47:15 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/gui/scripts/heightmapviewer.tcl
r1923 r1985 103 103 private variable _resizePending 0 104 104 private variable _resizeLegendPending 0 105 private variable _frame 0; # Current frame number. 105 106 } 106 107 … … 508 509 # ---------------------------------------------------------------------- 509 510 itcl::body Rappture::HeightmapViewer::Connect {} { 511 global readyForNextFrame 512 set readyForNextFrame 1 510 513 Disconnect 511 514 set _hosts [GetServerList "nanovis"] … … 529 532 set _outbuf "" 530 533 # disconnected -- no more data sitting on server 534 global readyForNextFrame 535 set readyForNextFrame 1 531 536 } 532 537 … … 557 562 # ---------------------------------------------------------------------- 558 563 itcl::body Rappture::HeightmapViewer::ReceiveImage { args } { 564 global readyForNextFrame 565 set readyForNextFrame 1 559 566 if {![IsConnected]} { 560 567 return … … 565 572 array set info $args 566 573 set bytes [ReceiveBytes $info(-bytes)] 567 ReceiveEcho <<line "<read $info(-bytes) bytes" 574 ReceiveEcho <<line "<read $info(-bytes) bytes args=$args" 575 puts stderr "<read $info(-bytes) bytes" 568 576 if { $info(-type) == "image" } { 569 577 $_image(plot) configure -data $bytes 570 578 ReceiveEcho <<line "<read for [image width $_image(plot)]x[image height $_image(plot)] image>" 579 puts stderr "<read for [image width $_image(plot)]x[image height $_image(plot)] image>" 571 580 } elseif { $info(type) == "print" } { 572 581 set tag $this-print-$info(-token) … … 727 736 SendBytes $_outbuf; 728 737 blt::busy release $itk_component(hull) 738 739 # The "readyForNextFrame" variable throttles the sequence play rate. 740 global readyForNextFrame 741 set readyForNextFrame 0; # Don't advance to the next frame 742 # until we get an image. 729 743 set _buffering 0; # Turn off buffering. 730 744 set _outbuf ""; # Clear the buffer.
Note: See TracChangeset
for help on using the changeset viewer.