Changeset 1525 for trunk/gui/scripts/unirect2d.tcl
- Timestamp:
- Jun 17, 2009 4:18:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/unirect2d.tcl
r1512 r1525 19 19 20 20 itcl::class Rappture::Unirect2d { 21 constructor {xmlobj field cname } { # defined below }21 constructor {xmlobj field cname {extents 1}} { # defined below } 22 22 destructor { # defined below } 23 23 … … 31 31 private method GetSize { obj path varName } 32 32 33 private variable _axisOrder "x y" 34 private variable _xMax 0 35 private variable _xMin 0 36 private variable _xNum 0 37 private variable _yMax 0 38 private variable _yMin 0 39 private variable _yNum 0 40 private variable _values ""; # BLT vector containing the z-values 33 private variable _axisOrder "x y" 34 private variable _xMax 0 35 private variable _xMin 0 36 private variable _xNum 0 37 private variable _yMax 0 38 private variable _yMin 0 39 private variable _yNum 0 40 private variable _compNum 1 41 private variable _values ""; # BLT vector containing the z-values 41 42 private variable _hints 42 43 } … … 45 46 # Constructor 46 47 # ---------------------------------------------------------------------- 47 itcl::body Rappture::Unirect2d::constructor {xmlobj field cname } {48 itcl::body Rappture::Unirect2d::constructor {xmlobj field cname {extents 1}} { 48 49 if {![Rappture::library isvalid $xmlobj]} { 49 50 error "bad value \"$xmlobj\": should be Rappture::library" … … 58 59 GetValue $m "yaxis.max" _yMax 59 60 GetSize $m "yaxis.numpoints" _yNum 60 61 set _compNum $extents 61 62 foreach {key path} { 62 63 group about.group … … 97 98 } 98 99 $_values set $values 100 set n [expr $_xNum * $_yNum * $_compNum] 101 if { [$_values length] != $n } { 102 error "wrong \# of values in \"$cname.values\": expected $n values" 103 } 99 104 } 100 105
Note: See TracChangeset
for help on using the changeset viewer.