double range = getMax()-getMin(); int offset = isSigned16Bit()?32768:0; int min2 = (int)getMin() - offset; int max2 = (int)getMax() - offset;
double range = getMax()-getMin(); int offset = isSigned16Bit()?32768:0; int min2 = (int)getMin() - offset; int max2 = (int)getMax() - offset;
double ylimit = height-1.0, ylimit2 = height-1.001; int background = isSigned16Bit()?bgValue+32768:bgValue;
double ylimit = height-1.0, ylimit2 = height-1.001; int background = isSigned16Bit()?bgValue+32768:bgValue;
/** Sets the foreground fill/draw color. */ public void setColor(Color color) { drawingColor = color; int bestIndex = getBestIndex(color); if (bestIndex>0 && getMin()==0.0 && getMax()==0.0) { setValue(bestIndex); setMinAndMax(0.0,255.0); } else if (bestIndex==0 && getMin()>0.0 && (color.getRGB()&0xffffff)==0) { if (isSigned16Bit()) setValue(32768); else setValue(0.0); } else fgColor = (int)(getMin() + (getMax()-getMin())*(bestIndex/255.0)); }
/** Sets the foreground fill/draw color. */ public void setColor(Color color) { drawingColor = color; int bestIndex = getBestIndex(color); if (bestIndex>0 && getMin()==0.0 && getMax()==0.0) { setValue(bestIndex); setMinAndMax(0.0,255.0); } else if (bestIndex==0 && getMin()>0.0 && (color.getRGB()&0xffffff)==0) { if (isSigned16Bit()) setValue(32768); else setValue(0.0); } else fgColor = (int)(getMin() + (getMax()-getMin())*(bestIndex/255.0)); }