Ignore:
Timestamp:
04/07/11 16:53:04 (9 years ago)
Author:
aivar
Message:

Fit parameters that were fixed were always displayed as black.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/slim-plugin/src/main/java/loci/slim/colorizer/ThreeColorColorize.java

    r7668 r7682  
    7777            if (value >= start && value <= stop) { 
    7878                double range = stop - start; 
    79                 value -= start; 
    80                 if (value < (range / 2.0)) { 
    81                     returnColor = interpolateColor(m_color1, m_color2, 2.0 * value / range); 
     79                if (0.0 == range) { 
     80                    returnColor = m_color2; 
    8281                } 
    8382                else { 
    84                     returnColor = interpolateColor(m_color2, m_color3, 2.0 * (value - (range / 2.0)) / range); 
     83                    value -= start; 
     84                    if (value < (range / 2.0)) { 
     85                        returnColor = interpolateColor(m_color1, m_color2, 2.0 * value / range); 
     86                    } 
     87                    else { 
     88                        returnColor = interpolateColor(m_color2, m_color3, 2.0 * (value - (range / 2.0)) / range); 
     89                    } 
    8590                } 
    8691            } 
Note: See TracChangeset for help on using the changeset viewer.