Changeset 2904


Ignore:
Timestamp:
06/25/07 20:45:17 (12 years ago)
Author:
sorber
Message:

Reinstated green circles highlighting polyline nodes (OverlayUtil).
Added a few lines and methods for scaling overlays in OverlayTransform.getData and OverlayObject. Added scaling method to OverlayMarker but did not enable.
Fixed bug in PolylineTool caused by OverlayNodedObject.setLastNode(), which would remove the second node in a two-node polyline when the polyline became too short.

Location:
trunk/loci/visbio/overlays
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/overlays/OverlayMarker.java

    r2823 r2904  
    3838  protected static final String[] STAT_TYPES =  {COORDS}; 
    3939 
     40  /** The default width of the marker */ 
     41  protected float width;  
     42 
    4043  // -- Constructors -- 
    4144 
     
    4851    x1 = x; 
    4952    y1 = y; 
     53    width = getDefaultWidth();  
    5054  } 
    5155 
     
    5761  // -- OverlayObject API methods -- 
    5862 
     63  /** Returns the defualt width of this marker. */ 
     64  protected float getDefaultWidth() { 
     65    return 0.02f * overlay.getScalingValue(); 
     66  } 
     67 
     68  /** Returns the width of this marker. */ 
     69  protected float getWidth() { return width; } 
     70 
    5971  /** Gets VisAD data object representing this overlay. */ 
    6072  public DataImpl getData() { 
     
    6274    RealTupleType domain = overlay.getDomainType(); 
    6375    TupleType range = overlay.getRangeType(); 
    64     float size = 0.02f * overlay.getScalingValue(); 
    6576 
    6677    float[][] setSamples = { 
    67       {x1, x1, x1, x1 + size, x1 - size}, 
    68       {y1 + size, y1 - size, y1, y1, y1} 
     78      {x1, x1, x1, x1 + width, x1 - width}, 
     79      {y1 + width, y1 - width, y1, y1, y1} 
    6980    }; 
    7081    Color col = selected ? GLOW_COLOR : color; 
     
    119130  public boolean hasEndpoint() { return true; } 
    120131 
     132  /** OverlayMarker's are scalable--returns true. */ 
     133  public boolean isScalable() { return true; } 
     134 
     135  /** Rescales an OverlayMarker. */ 
     136  public void rescale(float multiplier) { 
     137    //width = getDefaultWidth() * multiplier; 
     138  } 
     139 
    121140  // -- Object API methods -- 
    122141 
  • trunk/loci/visbio/overlays/OverlayNodedObject.java

    r2903 r2904  
    105105  /** Index of the highlighted node */ 
    106106  protected int highlightIndex; 
    107  
    108   /** Color to highlight highlighted node */ 
    109   protected Color highlightColor; 
    110107 
    111108  // -- Constructors -- 
     
    318315 
    319316  /** Highlight a node. */ 
    320   public void setHighlightNode(int i, Color c) { 
     317  public void setHighlightNode(int i) { 
    321318    // if (Thread.currentThread().getName().indexOf("ComputeDataThread") < 0) 
    322319    // new Exception().printStackTrace(); 
    323320    highlightNode = true; 
    324321    highlightIndex = i; 
    325     highlightColor = c; 
    326322  } 
    327323 
     
    330326    highlightNode = false; 
    331327    highlightIndex = -1; 
    332     highlightColor = null; 
    333328  } 
    334329 
  • trunk/loci/visbio/overlays/OverlayObject.java

    r2725 r2904  
    203203  /** Gets whether overlay is solid. */ 
    204204  public boolean isFilled() { return filled; } 
     205   
     206  /** Gets whether overlay is scalable. */ 
     207  public boolean isScalable() { return false; } 
     208 
     209  /** Rescales this overlay object. */ 
     210  public void rescale(float multiplier) {} 
    205211 
    206212  /** Sets group to which this overlay belongs. */ 
  • trunk/loci/visbio/overlays/OverlayTransform.java

    r2868 r2904  
    547547    // grids. 
    548548 
     549    // The current display 
     550    DisplayImpl display = link.getHandler().getWindow().getDisplay();  
     551 
    549552    if (dim != 2) { 
    550553      System.err.println(name + ": invalid dimensionality (" + dim + ")"); 
     
    582585            for (int i=0, c=0; i<size && c<rgbSize; i++) { 
    583586              OverlayObject obj = (OverlayObject) overlays[q].elementAt(i); 
     587              // rescale object if appropriate 
     588              // (currently applies only to OverlayMarkers) 
     589              if (obj.isScalable()) 
     590                obj.rescale(OverlayUtil.getMultiplier(display));  
    584591              if (obj.hasText()) continue; 
    585592              rgbField.setSample(c++, obj.getData(), false); 
  • trunk/loci/visbio/overlays/OverlayUtil.java

    r2903 r2904  
    180180    double d = GLOW_WIDTH * getMultiplier(link); 
    181181 
    182     // compute four corners of highlighted zone 
     182    // compute four corners of highlighted zone, a trapezoidal area around the 
     183    // arrow, always a perpendicular distance d from the arrow's edge. 
     184    // (Formulas come from pen-and-paper geometry using similar triangles). 
    183185    float c1x = (float) (x1 - x[0] * d + y[0] * (d * c) / b); 
    184186    float c1y = (float) (y1 - x[1] * d + y[1] * (d * c) / b); 
     
    378380    float y2 = obj.getY2(); 
    379381 
    380     float size = 0.02f * overlay.getScalingValue(); 
     382    float size = ((OverlayMarker) obj).getWidth(); 
    381383    float delta = GLOW_WIDTH * getMultiplier(link); 
    382384 
     
    517519     
    518520    int samples = 0; 
    519     UnionSet unionSet = null; 
    520     try { 
    521       unionSet = buildNodesSets(domain, nodes, delta); 
    522       samples = unionSet.getLength(); 
    523     } 
    524     catch (VisADException ex) { ex.printStackTrace(); } 
     521 
     522    Vector sets = buildNodesSets(domain, nodes, delta); 
     523    samples = sets.size() * 4; 
    525524 
    526525    //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
    527526     
    528527    int hlen = hlt ? len : 0; 
    529     float[][] rangeSamples = new float[4][samples]; 
     528    float[][] rangeSamples = new float[4][samples+hlen]; 
    530529 
    531530    // fill nodes range samples; 
     
    536535 
    537536    // ADJUST THIS to account for circles later 
    538     Arrays.fill(rangeSamples[0], r); 
    539     Arrays.fill(rangeSamples[1], g); 
    540     Arrays.fill(rangeSamples[2], b); 
    541     Arrays.fill(rangeSamples[3], GLOW_ALPHA); 
    542  
    543     // REMOVE this when adding circles later 
    544     FlatField field = null; 
    545     try { 
    546       FunctionType fieldType = new FunctionType(domain, range); 
    547       field = new FlatField(fieldType, unionSet); 
    548       field.setSamples(rangeSamples); 
    549     } 
    550     catch (VisADException exc) { exc.printStackTrace(); } 
    551     catch (RemoteException exc) { exc.printStackTrace(); } 
    552  
    553     return field; 
     537    Arrays.fill(rangeSamples[0], 0, samples, r); 
     538    Arrays.fill(rangeSamples[1], 0, samples, g); 
     539    Arrays.fill(rangeSamples[2], 0, samples, b); 
     540    Arrays.fill(rangeSamples[3], 0, samples, GLOW_ALPHA); 
    554541 
    555542    // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
     
    561548    System.out.println("Thread.currentThread()" + Thread.currentThread()); 
    562549    */ 
    563     /* 
    564550    Gridded2DSet hltSet = null; 
    565551    if (hlt) { 
     
    589575      catch (VisADException ex) { ex.printStackTrace(); } 
    590576 
     577      // fill highlight range samples 
    591578      col = HLT_COLOR; 
    592579      r = col.getRed() / 255f; 
     
    594581      b = col.getBlue() / 255f; 
    595582 
    596       Arrays.fill(rangeSamples[0], 4*goodSets, 4*goodSets + hlen, r); 
    597       Arrays.fill(rangeSamples[1], 4*goodSets, 4*goodSets + hlen, g); 
    598       Arrays.fill(rangeSamples[2], 4*goodSets, 4*goodSets + hlen, b); 
    599       Arrays.fill(rangeSamples[3], 4*goodSets, 4*goodSets + hlen, HLT_ALPHA); 
     583      Arrays.fill(rangeSamples[0], samples, samples + hlen, r); 
     584      Arrays.fill(rangeSamples[1], samples, samples + hlen, g); 
     585      Arrays.fill(rangeSamples[2], samples, samples + hlen, b); 
     586      Arrays.fill(rangeSamples[3], samples, samples + hlen, HLT_ALPHA); 
    600587 
    601588      sets.add(hltSet); 
    602  
    603       Gridded2DSet[] trueSets = new Gridded2DSet[sets.size()]; 
    604       Object[] stuff = sets.toArray(trueSets); 
    605  
    606       FlatField field = null; 
    607       UnionSet fieldSet = null; 
    608       try { 
    609         /* 
    610         for (int i=0; i<sets.length; i++) { 
    611           if (sets[i] == null) { 
    612             System.out.println("sets[" + i + "] is null."); 
    613           } 
    614           else { 
    615             System.out.println("sets[" + i + "].length = " + 
    616               sets[i].getLength()); 
    617           } 
    618         } 
    619         */ 
    620     /* 
    621         fieldSet = new UnionSet (domain, trueSets); 
    622         FunctionType fieldType = new FunctionType(domain, range); 
    623         field = new FlatField(fieldType, fieldSet); 
    624         field.setSamples(rangeSamples); 
    625       } 
    626       catch (VisADException exc) { exc.printStackTrace(); } 
    627       catch (RemoteException exc) { exc.printStackTrace(); } 
    628  
    629       return field; 
    630     } 
    631     */ 
    632  
    633     /* 
    634     // compute angle bisectors at each node 
    635     for (int i=0; i<numNodes; i++) { 
    636       if (i == 0){ 
    637       } 
    638       if (i == numNodes - 1){ 
    639       } 
    640       else { 
    641         float[] v1 = {nodes[0][i] - nodes[0][i-1], nodes[1][i] - nodes[1][i-1]}; 
    642         float[] v2 = {nodes[0][i+1] - nodes[0][i], nodes[1][i+1] - nodes[1][i]}; 
    643  
    644     }*/ 
    645   } 
    646  
     589    } 
     590 
     591    // convert vector to an array 
     592    Gridded2DSet[] trueSets = new Gridded2DSet[sets.size()]; 
     593    Object[] rubbish = sets.toArray(trueSets); 
     594 
     595    // form a union set and then a flat field 
     596    FlatField field = null; 
     597    UnionSet fieldSet = null; 
     598    try { 
     599      fieldSet = new UnionSet (domain, trueSets); 
     600      FunctionType fieldType = new FunctionType(domain, range); 
     601      field = new FlatField(fieldType, fieldSet); 
     602      field.setSamples(rangeSamples); 
     603    } 
     604    catch (VisADException exc) { exc.printStackTrace(); } 
     605    catch (RemoteException exc) { exc.printStackTrace(); } 
     606 
     607    return field; 
     608  } 
    647609  /** Computes a selection layer for OverlayOval objects */ 
    648610  public static DataImpl getOvalLayer(OverlayObject obj, TransformLink link) { 
     
    926888  /** Given a set of nodes, creates a UnionSet of Gridded2DSets to  
    927889   *  highlight the nodes. */ 
    928   public static UnionSet buildNodesSets(RealTupleType domain, float[][] nodes, 
    929       float width)  
    930     throws VisADException { 
     890  public static Vector buildNodesSets(RealTupleType domain, float[][] nodes, 
     891      float width) { 
    931892    int len = nodes[0].length; 
    932893 
     
    10651026     
    10661027    // assemble an array of gridded sets representing the highlighting 
    1067     Gridded2DSet[] sets = makeGridded2DSets(domain, nodes, right, left, width); 
    1068     UnionSet fieldSets = null; 
    1069     fieldSets = new UnionSet(domain, sets); 
    1070  
    1071     return fieldSets; 
     1028    return makeGridded2DSets(domain, nodes, right, left, width); 
    10721029  }  
    10731030 
     
    10791036   *  supposing node indices increase from left to right across the screen) 
    10801037   */    
    1081   public static Gridded2DSet[] makeGridded2DSets(RealTupleType domain, 
     1038  public static Vector makeGridded2DSets(RealTupleType domain, 
    10821039      float nodes[][], float[][] right, float[][] left, float width) { 
    10831040 
     
    11511108    } // end for 
    11521109 
    1153     // Convert vector to array 
    1154     Gridded2DSet[] trueSets = new Gridded2DSet[sets.size()]; 
    1155     Object[] garbage = sets.toArray(trueSets); 
    1156  
    1157     return trueSets; 
     1110    return sets; 
    11581111  } 
    11591112 
  • trunk/loci/visbio/overlays/PolylineTool.java

    r2900 r2904  
    2525 
    2626import java.awt.event.InputEvent; 
    27 import java.awt.Color; 
    2827import java.util.Vector; 
    2928import loci.visbio.data.TransformEvent; 
     
    3736 
    3837  // -- Constants -- 
    39   protected static final int ERASE = -1; 
     38  /** The Different modes of this tool. */ 
    4039  protected static final int WAIT = 0; 
    4140  protected static final int EXTEND = 1; 
     
    4746  protected static final int SELECTED_TAIL = 7; 
    4847  protected static final int EXTEND_ON_TAIL = 8; 
    49   protected static final int BEG_EXTEND = 9; 
     48  protected static final int BEGIN_EXTEND = 9; 
    5049 
    5150  /** Maximum distance (in pixels) mouse can be from a node to be considered 
     
    5352  protected static final double THRESH = 
    5453    OverlayNumericStrategy.getPolylineThreshold(); 
    55  
    56   /** Color for highlighting head or tail node of polyline when 'connecting' 
    57    *  free end to fixed end */ 
    58   protected static final Color CON = Color.GREEN; 
    59  
    60   /** Color for highlighting head or tail node when the mouse is nearby or 
    61    *  when dragging the node. */ 
    62   protected static final Color SEL = Color.YELLOW; 
    6354 
    6455  // -- Fields -- 
     
    9182    float dx, float dy, int[] pos, int mods) 
    9283  { 
    93     //System.out.println("down mode = " + mode); 
     84    // printMode("mouseDown"); // use printMode() to help debug this tool. 
    9485    boolean ctl = (mods & InputEvent.CTRL_MASK) != 0; 
    9586    DisplayImpl display = (DisplayImpl) e.getDisplay(); 
    96  
    97     // printMode("mouseDown"); 
    9887 
    9988    if (overlay.hasToolChanged()) { 
     
    155144      } 
    156145    } 
    157     else if (mode == EXTEND || mode == BEG_EXTEND) { 
    158       line.setLastNode(dx, dy); 
     146    else if (mode == EXTEND || mode == BEGIN_EXTEND) { 
     147      // line.setLastNode(dx, dy); 
     148      adjustLastNode(line, dx, dy); 
    159149      mode = PLACE; 
    160150    } 
     
    171161  public void mouseDrag(DisplayEvent e, int px, int py, 
    172162    float dx, float dy, int[] pos, int mods) { 
    173     //System.out.println("mode = " + mode); 
     163    // printMode("mouseDrag"); 
    174164    DisplayImpl display = (DisplayImpl) e.getDisplay(); 
    175  
    176     // printMode("mouseDrag"); 
    177165 
    178166    if (overlay.hasToolChanged()) { 
     
    196184      // if near, highlight head node 
    197185      if (dist < THRESH) { 
    198         line.setHighlightNode(selectedNode, CON); 
     186        line.setHighlightNode(selectedNode); 
    199187        mode = CLOSE_LOOP; 
    200188      } 
    201189      else { 
    202         line.setHighlightNode(selectedNode, SEL); 
     190        line.setHighlightNode(selectedNode); 
    203191        mode = ADJUST_TAIL; 
    204192      } 
    205193      overlay.notifyListeners(new TransformEvent(overlay)); 
    206194    } 
    207     else if (mode == PLACE || mode == EXTEND || mode == BEG_EXTEND || 
     195    else if (mode == PLACE || mode == EXTEND || mode == BEGIN_EXTEND || 
    208196      mode == EXTEND_ON_TAIL) 
    209197    { 
     
    215203  public void mouseUp(DisplayEvent e, int px, int py, 
    216204      float dx, float dy, int[] pos, int mods) { 
    217     //System.out.println("up mode = " + mode); 
     205    // printMode("mouseUp"); 
    218206    DisplayImpl display = (DisplayImpl) e.getDisplay(); 
    219     // printMode("mouseUp");//TEMP 
    220207 
    221208    if (overlay.hasToolChanged()) { 
     
    245232      line.computeLength(); 
    246233      line.setDrawing(false); 
    247       selectNode(line, line.getNumNodes() - 1); 
     234      //selectNode(line, line.getNumNodes() - 1); 
    248235      mode = SELECT; 
    249236    } 
     
    257244  public void mouseMoved(DisplayEvent e, int px, int py, 
    258245      float dx, float dy, int[] pos, int mods) { 
    259     //System.out.println("moved mode = " + mode); 
    260246    DisplayImpl display = (DisplayImpl) e.getDisplay(); 
    261     // printMode("mouseMoved"); // TEMP 
     247    // printMode("mouseMoved"); 
    262248 
    263249    if (overlay.hasToolChanged()) { 
     
    272258        int ndx = ndxNode[0]; 
    273259        int node = ndxNode[1]; 
    274         //System.out.println("near node " + node + " of object " + obj);//TEMP 
    275260        deselectAll(); 
    276261        line = (OverlayPolyline) objects[ndx]; 
     
    290275            new double[]{dx, dy})); 
    291276 
    292       mode = BEG_EXTEND; 
     277      mode = BEGIN_EXTEND; 
    293278    } 
    294279    else if (mode == EXTEND || mode == EXTEND_ON_TAIL) { 
    295       // update curve 
     280      // change coords of last node to reflect mouse motion and update length 
     281      adjustLastNode(line, dx, dy); 
     282 
     283      if (line.getNumNodes() > 2) { 
     284        // determine if near head 
     285        double hdist = getDistanceToNode(0, px, py, display); 
     286 
     287        // determine if near last node placed 
     288        double ldist = 
     289          getDistanceToNode(line.getNumNodes() - 2, px, py, display); 
     290 
     291 
     292        // if near ndx, highlight selected node differently 
     293        int flag = -1; 
     294        if (ldist < THRESH) 
     295          if (hdist < ldist) flag = 0; 
     296          else if (hdist > ldist) flag = 1; 
     297          else ; 
     298        else if (hdist < THRESH) flag = 0; 
     299 
     300        if (flag == 0) { 
     301          line.setHighlightNode(0); 
     302          mode = CLOSE_LOOP; 
     303        } 
     304        else if (flag == 1) { 
     305          line.setHighlightNode(line.getNumNodes()-1); 
     306          mode = EXTEND_ON_TAIL; 
     307        } 
     308        else if (flag == -1) { 
     309          line.turnOffHighlighting(); 
     310          mode = EXTEND; 
     311        } 
     312      } 
     313    } 
     314    else if (mode == BEGIN_EXTEND) { 
     315      // change coords of last node to reflect mouse motion and update length 
    296316      adjustLastNode(line, dx, dy); 
    297317 
     
    303323        getDistanceToNode(line.getNumNodes() - 2, px, py, display); 
    304324 
    305       // if near ndx, highlight selected node differently 
    306       int flag = -1; 
    307       if (ldist < THRESH) 
    308         if (hdist < ldist) flag = 0; 
    309         else if (hdist > ldist) flag = 1; 
    310         else ; 
    311       else if (hdist < THRESH) flag = 0; 
    312  
    313       if (flag == 0) { 
    314         line.setHighlightNode(0, CON); 
    315         mode = CLOSE_LOOP; 
    316       } 
    317       else if (flag == 1) { 
    318         line.setHighlightNode(line.getNumNodes()-1, SEL); 
    319         mode = EXTEND_ON_TAIL; 
    320       } 
    321       else if (flag == -1) { 
    322         line.turnOffHighlighting(); 
    323         mode = EXTEND; 
    324       } 
    325     } 
    326     else if (mode == BEG_EXTEND) { 
    327       // adjust last node and update curve length 
    328       adjustLastNode(line, dx, dy); 
    329  
    330       // determine if near head 
    331       double hdist = getDistanceToNode(0, px, py, display); 
    332  
    333       // determine if near last node placed 
    334       double ldist = 
    335         getDistanceToNode(line.getNumNodes() - 2, px, py, display); 
    336  
    337325      // highlight last visible node if near head 
    338326      if (line.getNumNodes() >= 3 && hdist < THRESH) { 
    339         line.setHighlightNode(line.getNumNodes()-1, CON); 
     327        line.setHighlightNode(line.getNumNodes()-1); 
    340328        mode = CLOSE_LOOP; 
    341329      } 
     
    347335    } 
    348336    else if (mode == CLOSE_LOOP) { 
    349       line.setLastNode(dx, dy); 
     337      //line.setLastNode(dx, dy); 
     338      adjustLastNode(line, dx, dy); 
    350339      // determine if near head: 
    351340      double dist = getDistanceToNode(0, px, py, display); 
     
    355344        line.turnOffHighlighting(); 
    356345        mode = EXTEND; 
     346      } 
     347      else { // Turn it on 
     348        selectNode(line, line.getNumNodes() - 1); 
    357349      } 
    358350    } 
     
    377369  /** Adjusts last node and curve length */ 
    378370  private void adjustLastNode (OverlayPolyline line, float dx, float dy) { 
    379     double lastSegLength = line.getLastSegmentLength(); 
    380     line.setLastNode(dx, dy); 
    381     double newLastSegLength = line.getLastSegmentLength(); 
    382     double delta = newLastSegLength - lastSegLength; 
    383     line.setCurveLength(line.getCurveLength() + delta); 
    384   } 
    385  
    386   // TODO -- combine this method with the similar one for freeforms; 
     371    int numNodes = line.getNumNodes(); 
     372    boolean adjust = false; 
     373    if (numNodes > 1) { 
     374      float[] d = {dx, dy}; 
     375      float[] p = line.getNodeCoords(line.getNumNodes()-2); 
     376      if (MathUtil.areDifferent(d, p)) adjust = true; 
     377    } 
     378    else { 
     379      adjust = true; 
     380    } 
     381    if (adjust) { 
     382      double lastSegLength = line.getLastSegmentLength(); 
     383      line.setLastNode(dx, dy); 
     384      double newLastSegLength = line.getLastSegmentLength(); 
     385      double delta = newLastSegLength - lastSegLength; 
     386      line.setCurveLength(line.getCurveLength() + delta); 
     387    } 
     388  } 
     389 
     390  // TODO -- combine this method with the similar one for freeforms, 
     391  // currently located in OverlayNodedObject.java 
    387392  /** Splits an overlay polyline in two */ 
    388393  private void split (OverlayPolyline line, int selectedNode) { 
     
    410415 
    411416    // if a non-trivial polyline remains 'right' of deleted node 
    412     if (selectedNode < numNodes - 1) { 
     417    if (selectedNode < numNodes - 2) { 
    413418      for (int i=0; i<2; i++) { 
    414419        System.arraycopy(nodes[i], numNodes1 + 1, n2[i], 0, 
     
    437442  private void releaseLine() { 
    438443    if (line != null) { 
    439       line.turnOffHighlighting(); 
    440       line.updateBoundingBox(); 
    441       line.computeLength(); 
    442       line.setDrawing(false); 
    443       line.setSelected(true); 
    444       unselect(); 
     444      if (line.getNumNodes() > 1) { 
     445        line.turnOffHighlighting(); 
     446        line.updateBoundingBox(); 
     447        line.computeLength(); 
     448        line.setDrawing(false); 
     449        line.setSelected(true); 
     450        unselect(); 
     451      } 
     452      else { 
     453        // remove if too few nodes 
     454        overlay.removeObject(line); 
     455      } 
    445456    } 
    446457  } 
     
    457468    line.setSelected(true); 
    458469    selectedNode = node; 
    459     pln.setHighlightNode(node, SEL); 
     470    pln.setHighlightNode(node); 
    460471  } 
    461472 
     
    534545    String m; 
    535546    switch (mode) { 
    536       case ERASE          : m = "erase"; break; 
    537547      case WAIT           : m = "wait"; break; 
    538548      case EXTEND         : m = "extend"; break; 
     
    544554      case SELECTED_TAIL  : m = "selected tail"; break; 
    545555      case EXTEND_ON_TAIL : m = "extend on tail"; break; 
    546       case BEG_EXTEND     : m = "begin extend"; break; 
     556      case BEGIN_EXTEND   : m = "begin extend"; break; 
    547557      default             : m = "unknown mode"; break; 
    548558    } 
Note: See TracChangeset for help on using the changeset viewer.