Changeset 998 for trunk/examples


Ignore:
Timestamp:
Apr 24, 2008, 1:32:03 PM (16 years ago)
Author:
dkearney
Message:

updating sequence example to show how to use the new sequence element labels

Location:
trunk/examples/zoo/sequence
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/zoo/sequence/sequence.tcl

    r428 r998  
    2828set zoomi [image create photo -width $zwd -height $zht]
    2929
     30$driver put output.sequence(outs).about.label "Animated sequence"
     31$driver put output.sequence(outs).index.label "Frame"
     32
    3033for {set n 0} {$n < $nframes} {incr n} {
    3134    set frac [expr {($n+1)/double($nframes)}]
     
    3538    $zoomi copy $imh -from $x0 $y0
    3639
    37     $driver put output.sequence(outs).element($n).index [expr {$n+1}]
     40    set index [expr {$n+1}]
     41    $driver put output.sequence(outs).element($n).index $index
    3842    $driver put output.sequence(outs).element($n).image.current \
    3943        [$zoomi data -format jpeg]
     44    $driver put output.sequence(outs).element($n).about.label "$index of $nframes"
    4045}
    4146
  • trunk/examples/zoo/sequence/tool.xml

    r428 r998  
    3636  </integer>
    3737</input>
    38 <output>
    39   <sequence id="outs">
    40     <about><label>Animated sequence</label></about>
    41     <index><label>Frame</label></index>
    42   </sequence>
    43 </output>
    4438</run>
Note: See TracChangeset for help on using the changeset viewer.