diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-10 18:35:53 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-10 18:35:53 (GMT) |
commit | 92ad0b6f98fafe51cf6fbb4ff4a082cc87d8ee3c (patch) | |
tree | d70b3c644cf9703e275f855237ca0284d85372f2 /ds9/library/rgbimage.tcl | |
parent | af4920d1c5c55b2be51b8f76f6f1ef168003f8d2 (diff) | |
download | blt-92ad0b6f98fafe51cf6fbb4ff4a082cc87d8ee3c.zip blt-92ad0b6f98fafe51cf6fbb4ff4a082cc87d8ee3c.tar.gz blt-92ad0b6f98fafe51cf6fbb4ff4a082cc87d8ee3c.tar.bz2 |
add ds9 srgbcube parser
Diffstat (limited to 'ds9/library/rgbimage.tcl')
-rw-r--r-- | ds9/library/rgbimage.tcl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ds9/library/rgbimage.tcl b/ds9/library/rgbimage.tcl index 4f40c32..8f96d68 100644 --- a/ds9/library/rgbimage.tcl +++ b/ds9/library/rgbimage.tcl @@ -129,6 +129,18 @@ proc ProcessRGBImageCmd {varname iname sock fn} { upvar $varname var upvar $iname i + global debug + if {$debug(tcl,parser)} { + global rgbimage + set rgbimage(load,sock) $sock + set rgbimage(load,fn) $fn + + rgbimage::YY_FLUSH_BUFFER + rgbimage::yy_scan_string [lrange $var $i end] + rgbimage::yyparse + incr i [expr $rgbimage::yycnt-1] + } else { + switch -- [string tolower [lindex $var $i]] { new { incr i @@ -161,6 +173,27 @@ proc ProcessRGBImageCmd {varname iname sock fn} { } FinishLoad } +} + +proc RGBImageCmdLoad {param} { + global rgbimage + + if {$rgbimage(load,sock) != {}} { + # xpa + if {![LoadRGBImageSocket $rgbimage(load,sock) $param]} { + InitError xpa + LoadRGBImageFile $param + } + } else { + # comm + if {$rgbimage(load,fn) != {}} { + LoadRGBImageAlloc $rgbimage(load,fn) $param + } else { + LoadRGBImageFile $param + } + } + FinishLoad +} proc ProcessSendRGBImageCmd {proc id param sock fn} { global current |