Ignore:
Timestamp:
Jun 17, 2009 4:18:02 AM (15 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/unirect2d.tcl

    r1512 r1525  
    1919
    2020itcl::class Rappture::Unirect2d {
    21     constructor {xmlobj field cname} { # defined below }
     21    constructor {xmlobj field cname {extents 1}} { # defined below }
    2222    destructor { # defined below }
    2323
     
    3131    private method GetSize { obj path varName }
    3232
    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
    4142    private variable _hints
    4243}
     
    4546# Constructor
    4647# ----------------------------------------------------------------------
    47 itcl::body Rappture::Unirect2d::constructor {xmlobj field cname} {
     48itcl::body Rappture::Unirect2d::constructor {xmlobj field cname {extents 1}} {
    4849    if {![Rappture::library isvalid $xmlobj]} {
    4950        error "bad value \"$xmlobj\": should be Rappture::library"
     
    5859    GetValue $m "yaxis.max" _yMax
    5960    GetSize $m "yaxis.numpoints" _yNum
    60    
     61    set _compNum $extents
    6162    foreach {key path} {
    6263        group   about.group
     
    9798    }
    9899    $_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    }
    99104}
    100105
Note: See TracChangeset for help on using the changeset viewer.