summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ds9/library/mask.tcl27
-rw-r--r--ds9/parsers/masklex.fcl3
-rw-r--r--tksao/frame/frame.C5
-rw-r--r--tksao/frame/frame.h1
4 files changed, 36 insertions, 0 deletions
diff --git a/ds9/library/mask.tcl b/ds9/library/mask.tcl
index 10e754b..09ece84 100644
--- a/ds9/library/mask.tcl
+++ b/ds9/library/mask.tcl
@@ -20,6 +20,24 @@ proc MaskDef {} {
array set pmask [array get mask]
}
+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 {} {
global mask
global current
@@ -29,6 +47,15 @@ proc MaskTransparency {} {
}
}
+proc MaskSystem {} {
+ global mask
+ global current
+
+ if {$current(frame) != {}} {
+ $current(frame) mask system $mask(system)
+ }
+}
+
proc MaskClear {} {
global current
diff --git a/ds9/parsers/masklex.fcl b/ds9/parsers/masklex.fcl
index 080b345..45d633f 100644
--- a/ds9/parsers/masklex.fcl
+++ b/ds9/parsers/masklex.fcl
@@ -12,8 +12,11 @@ clear {return $CLEAR_}
color {return $COLOR_}
mark {return $MARK_}
open {return $OPEN_}
+system {return $SYSTEM_}
transparency {return $TRANSPARENCY_}
+#include coordsys.fin
+#include wcssys.fin
#include numeric.fin
#include string.fin
#include ws.fin
diff --git a/tksao/frame/frame.C b/tksao/frame/frame.C
index 119e63d..ea061ca 100644
--- a/tksao/frame/frame.C
+++ b/tksao/frame/frame.C
@@ -55,6 +55,11 @@ Frame::~Frame()
delete [] maskColorName;
}
+void Frame::alignWCS() {
+ Base::alignWCS();
+ updateMaskMatrices();
+}
+
unsigned char* Frame::blend(unsigned char* src, unsigned char* msk,
int width, int height)
{
diff --git a/tksao/frame/frame.h b/tksao/frame/frame.h
index 2f981b1..dd2b879 100644
--- a/tksao/frame/frame.h
+++ b/tksao/frame/frame.h
@@ -43,6 +43,7 @@ class Frame : public FrameBase {
void unloadFits();
protected:
+ void alignWCS();
int isFrame() {return 1;}
unsigned char* fillImage(int width, int height, Coord::InternalSystem);