diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-03-11 21:17:59 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-03-11 21:17:59 (GMT) |
commit | eef1b4e01cc3c5307188e1497e6b095081eef378 (patch) | |
tree | b27c812b352c9024fe4a5b9dbab6f6102a581156 /ds9/library | |
parent | f7a9669c931c4da48dbc39d3f90b17ea2314ab9c (diff) | |
download | blt-eef1b4e01cc3c5307188e1497e6b095081eef378.zip blt-eef1b4e01cc3c5307188e1497e6b095081eef378.tar.gz blt-eef1b4e01cc3c5307188e1497e6b095081eef378.tar.bz2 |
add region fill
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/box.tcl | 15 | ||||
-rw-r--r-- | ds9/library/circle.tcl | 15 | ||||
-rw-r--r-- | ds9/library/ellipse.tcl | 15 | ||||
-rw-r--r-- | ds9/library/polygon.tcl | 17 |
4 files changed, 62 insertions, 0 deletions
diff --git a/ds9/library/box.tcl b/ds9/library/box.tcl index b28d84b..0164191 100644 --- a/ds9/library/box.tcl +++ b/ds9/library/box.tcl @@ -21,6 +21,7 @@ proc BoxDialog {varname} { set var(dcoord) [lindex $rr 0] set var(dformat) $pmarker(dformat) AdjustCoordSystem $varname dcoord + set var(fill) [$var(frame) get marker $var(id) box fill] # procs set var(proc,apply) BoxApply @@ -30,6 +31,11 @@ proc BoxDialog {varname} { # base MarkerBaseCenterDialog $varname + # menu + $var(mb).color add separator + $var(mb).color add checkbutton -label [msgcat::mc {Fill}] \ + -variable ${varname}(fill) -command [list BoxFill $varname] + # analysis $var(mb) add cascade -label [msgcat::mc {Analysis}] -menu $var(mb).analysis menu $var(mb).analysis @@ -92,6 +98,15 @@ proc BoxApply {varname} { MarkerBaseCenterApply $varname } +# support + +proc BoxFill {varname} { + upvar #0 $varname var + global $varname + + $var(frame) marker $var(id) box fill $var(fill) +} + # callbacks proc BoxCoordCB {varname {dummy {}}} { diff --git a/ds9/library/circle.tcl b/ds9/library/circle.tcl index 209af01..90e1f1c 100644 --- a/ds9/library/circle.tcl +++ b/ds9/library/circle.tcl @@ -21,6 +21,7 @@ proc CircleDialog {varname} { set var(dcoord) [lindex $rr 0] set var(dformat) $pmarker(dformat) AdjustCoordSystem $varname dcoord + set var(fill) [$var(frame) get marker $var(id) circle fill] # procs set var(proc,apply) CircleApply @@ -30,6 +31,11 @@ proc CircleDialog {varname} { # base MarkerBaseCenterDialog $varname + # menu + $var(mb).color add separator + $var(mb).color add checkbutton -label [msgcat::mc {Fill}] \ + -variable ${varname}(fill) -command [list CircleFill $varname] + # analysis $var(mb) add cascade -label [msgcat::mc {Analysis}] -menu $var(mb).analysis menu $var(mb).analysis @@ -77,6 +83,15 @@ proc CircleApply {varname} { MarkerBaseCenterApply $varname } +# support + +proc CircleFill {varname} { + upvar #0 $varname var + global $varname + + $var(frame) marker $var(id) circle fill $var(fill) +} + # callbacks proc CircleCoordCB {varname {dummy {}}} { diff --git a/ds9/library/ellipse.tcl b/ds9/library/ellipse.tcl index de25b7e..4423451 100644 --- a/ds9/library/ellipse.tcl +++ b/ds9/library/ellipse.tcl @@ -21,6 +21,7 @@ proc EllipseDialog {varname} { set var(dcoord) [lindex $rr 0] set var(dformat) $pmarker(dformat) AdjustCoordSystem $varname dcoord + set var(fill) [$var(frame) get marker $var(id) ellipse fill] # procs set var(proc,apply) EllipseApply @@ -30,6 +31,11 @@ proc EllipseDialog {varname} { # base MarkerBaseCenterDialog $varname + # menu + $var(mb).color add separator + $var(mb).color add checkbutton -label [msgcat::mc {Fill}] \ + -variable ${varname}(fill) -command [list EllipseFill $varname] + # analysis $var(mb) add cascade -label [msgcat::mc {Analysis}] -menu $var(mb).analysis menu $var(mb).analysis @@ -92,6 +98,15 @@ proc EllipseApply {varname} { MarkerBaseCenterApply $varname } +# support + +proc EllipseFill {varname} { + upvar #0 $varname var + global $varname + + $var(frame) marker $var(id) ellipse fill $var(fill) +} + # callbacks proc EllipseCoordCB {varname {dummy {}}} { diff --git a/ds9/library/polygon.tcl b/ds9/library/polygon.tcl index 82ab00a..25e205b 100644 --- a/ds9/library/polygon.tcl +++ b/ds9/library/polygon.tcl @@ -14,6 +14,9 @@ proc PolygonDialog {varname} { return } + # variables + set var(fill) [$var(frame) get marker $var(id) polygon fill] + # procs set var(proc,apply) PolygonApply set var(proc,close) PolygonClose @@ -22,6 +25,11 @@ proc PolygonDialog {varname} { # base MarkerBaseCenterDialog $varname + # menu + $var(mb).color add separator + $var(mb).color add checkbutton -label [msgcat::mc {Fill}] \ + -variable ${varname}(fill) -command [list PolygonFill $varname] + # analysis $var(mb) add cascade -label [msgcat::mc {Analysis}] -menu $var(mb).analysis menu $var(mb).analysis @@ -65,6 +73,15 @@ proc PolygonApply {varname} { MarkerBaseCenterApply $varname } +# support + +proc PolygonFill {varname} { + upvar #0 $varname var + global $varname + + $var(frame) marker $var(id) polygon fill $var(fill) +} + # callbacks proc PolygonCoordCB {varname {dummy {}}} { |