diff options
-rw-r--r-- | ds9/library/3d.tcl | 7 | ||||
-rw-r--r-- | ds9/library/marker.tcl | 25 | ||||
-rw-r--r-- | ds9/library/mask.tcl | 46 | ||||
-rw-r--r-- | ds9/library/source.tcl | 2 |
4 files changed, 55 insertions, 25 deletions
diff --git a/ds9/library/3d.tcl b/ds9/library/3d.tcl index 4199f87..6dd7fde 100644 --- a/ds9/library/3d.tcl +++ b/ds9/library/3d.tcl @@ -13,8 +13,6 @@ proc 3DDef {} { set ithreed(mb) .threedmb set ithreed(status) 0 - set threed(az) 0 - set threed(el) 0 set threed(scale) 1 set threed(lock) 0 @@ -28,8 +26,9 @@ proc 3DDef {} { set threed(compass,color) green array set pthreed [array get threed] - unset pthreed(az) - unset pthreed(el) + + set threed(az) 0 + set threed(el) 0 } # used by backup diff --git a/ds9/library/marker.tcl b/ds9/library/marker.tcl index bc998d3..71167ad 100644 --- a/ds9/library/marker.tcl +++ b/ds9/library/marker.tcl @@ -49,13 +49,17 @@ proc MarkerDef {} { set marker(plot3d) 0 set marker(stats) 0 + set marker(format) ds9 + + # these are only used for save/load/list and + # are set from current wcs values + array set pmarker [array get marker] + set marker(copy) {} set marker(copy,system) {} set marker(maxdialog) 48 set marker(load) current - set marker(format) ds9 - # these are only used for save/load/list and are set from current wcs values set marker(system) physical set marker(sky) fk5 set marker(skyformat) degrees @@ -69,23 +73,6 @@ proc MarkerDef {} { set marker(load,fn) {} set marker(tag) {} - array set pmarker [array get marker] - unset pmarker(copy) - unset pmarker(copy,system) - unset pmarker(maxdialog) - unset pmarker(load) - unset pmarker(system) - unset pmarker(sky) - unset pmarker(skyformat) - unset pmarker(strip) - - unset pmarker(load,format) - unset pmarker(load,system) - unset pmarker(load,sky) - unset pmarker(load,sock) - unset pmarker(load,fn) - unset pmarker(tag) - set pmarker(epsilon) 3 set pmarker(dformat) degrees set pmarker(circle,radius) 20 diff --git a/ds9/library/mask.tcl b/ds9/library/mask.tcl index 802315b..6adf882 100644 --- a/ds9/library/mask.tcl +++ b/ds9/library/mask.tcl @@ -17,6 +17,27 @@ proc MaskDef {} { set mask(transparency) 0 array set pmask [array get mask] + + # temporary + set mask(rr) {} +} + +proc MaskMark {} { + global mask + global current + + if {$current(frame) != {}} { + $current(frame) mask mark $mask(mark) + } +} + +proc MaskColor {} { + global mask + global current + + if {$current(frame) != {}} { + $current(frame) mask color $mask(color) + } } proc MaskTransparency {} { @@ -243,10 +264,21 @@ proc ProcessMaskCmd {varname iname} { upvar $iname i global mask - global current - set rr {} + global debug + if {$debug(tcl,parser)} { + set mask(rr) {} + mask::YY_FLUSH_BUFFER + mask::yy_scan_string [lrange $var $i end] + mask::yyparse + incr i [expr $mask::yycnt-1] + + return $mask(rr) + } else { + + set rr {} + global current switch -- [string tolower [lindex $var $i]] { open {MaskDialog} close {MaskDestroyDialog} @@ -284,6 +316,16 @@ proc ProcessMaskCmd {varname iname} { return $rr } +} + +proc MaskCmdSet {which value {cmd {}}} { + global mask + + set mask($which) $value + if {$cmd != {}} { + eval $cmd + } +} proc ProcessSendMaskCmd {proc id param} { global mask diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl index 7ca3f64..9535646 100644 --- a/ds9/library/source.tcl +++ b/ds9/library/source.tcl @@ -244,6 +244,8 @@ source $ds9(root)/library/lockparser.tcl source $ds9(root)/library/locklex.tcl source $ds9(root)/library/magnifierparser.tcl source $ds9(root)/library/magnifierlex.tcl +source $ds9(root)/library/maskparser.tcl +source $ds9(root)/library/masklex.tcl source $ds9(root)/library/matchparser.tcl source $ds9(root)/library/matchlex.tcl source $ds9(root)/library/nanparser.tcl |