Changeset 2331


Ignore:
Timestamp:
02/23/07 17:02:23 (13 years ago)
Author:
sorber
Message:

Enable DisplayEvent.MOUSE_MOVED events. Convert whole array of floats from domainToPixel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/util/DisplayUtil.java

    r2202 r2331  
    126126      d.disableEvent(DisplayEvent.MAP_REMOVED); 
    127127      d.enableEvent(DisplayEvent.MOUSE_DRAGGED); 
     128      d.enableEvent(DisplayEvent.MOUSE_MOVED); // for the polyline tool 
     129      //ACS TODO how does enabling MOUSE_MOVED affect performance? 
    128130 
    129131      // configure keyboard behavior 
     
    479481  } 
    480482 
     483  public static double[][] domainToPixel (DisplayImpl d, float[][] nodes) { 
     484    double[][] ret = new double[2][nodes[0].length]; 
     485    for (int i=0; i<nodes[0].length; i++) { 
     486       int[] coords = domainToPixel (d, new double[]{nodes[0][i], nodes[1][i]}); 
     487       ret[0][i] = coords[0]; 
     488       ret[1][i] = coords[1]; 
     489    } 
     490    return ret; 
     491  } 
     492 
    481493  /** Sets whether the given 3D display uses a parallel projection. */ 
    482494  public static void setParallelProjection(DisplayImpl d, boolean parallel) { 
Note: See TracChangeset for help on using the changeset viewer.